please open the attach below thank you !!!!!! this is just a part of it!
Lab 7
Given a well formed CVS file that represent accounts, write a program that reads the file into a linked list. A sample content of the CSV file is shown below, but the file can be of any length, i.e., there can be any number of transactions:
1/2/2012 12:23:34,Alice,Borden,123423453456,CHECKING,1000.0
2/3/2012 9:12:23,Charlie,Dwight,432154326543,SAVINGS,2000.0
3/2/2012 23:21:32,Evan,Almighty,234534564567,CHECKING,3000.0
The first column represents the following:
Date the account was open
First name of the client
Last name of the client
Account number
Type of account
Initial balance
Use the followng structure and enumeration to represent accounts:
struct Account {
Date date;
string firstName;
string lastName;
long number;
AccountType type;
double openningBalance;
}
enum AccountType { CHECKING, SAVINGS };
Use the following structure to represent the nodes in your linked list:
struct AccountNode {
Account account;
AccountNode* next;
}
Write two functions:
AccountNode* loadAccountsFromFIle ( string fileName );
Opens the CSV file called fileName
Parses the CSV file line by line
Creates a new instance of the Account structure for each of the lines
Creates a new node of the linked list
Adds the new node to a list. Feel free to use either an implementation of append() or push()
Returns a reference to the list of AccountNodes so that it can be manipulated further
void displayAccounts ( AccountNode* listOfAccounts );
Iterates through the list of AccountNodes
Displays each account in a single line
Terminates when the list has been exhausted
Feel free to reuse any code we have used so far in the course including any demo files and source in the slides.
Deliverables
Submit a single ZIP file called [login to view URL] that contains the following files:
[login to view URL] - has the main() function and makes use of the functions declared in the library. It does not contain any function or data type definitions. Includes the header to meet its dependencies
[login to view URL] - implements the functions declared in the header
LastnameFirstnameLab7Library.h - declares the functions and data types needed