Understanding a project description.

Hi,
I have a project to do and I am not sure if I understand my description. I don't expect you to fully understand it and I don't want it done for me. I was just wondering if you could explain it better to me.

Part 1 (30%)
In this part you will implement a Bank database using linked lists. A Bank comprises a "list" of customers and a "list" of accounts. Two files, customers0.txt and accounts0.txt contain customer records and account records for the bank, respectively.

Each customer record comprises a customerID, a lastName, a firstName and an address (just a town).

Each account record comprises an accountID, a customerID and a balance (in cents).

A customer may have more than one account, but an account may not belong to more than one customer (ie. no joint accounts). customerIDs start at 80000000 and accountIDs start at 90000000. customerIDs and accountIDs are unique.

Implement Customer, Account, CustomerList, BankList, Bank and any other appropriate classes you might need required to implement the bank database.

In your main function, create a bank object and populate it with data from the two input files.


So I have successfully completed the h and cpp files for the customer linked list, however I am wondering shouldn't I be required to have an account linked list as well? Why is it that we are only to do a linked list for customer and not account..

Also, what should I have in bank and banklist? Does it want us to combine the two linked lists into one linked list for bank and banklist?

For this bit "In your main function, create a bank object and populate it with data from the two input files." does this mean that my main file will be the "bank" listed above in the implement section? Or do I have to create a "main.cpp" file?

I apologise in advance for this question but I am stumped as to what way I am to approach the next stage of this. Like I said before I have customer.h customer.cpp customerlist.h customerlist.cpp all working fine and implemented. However I have no idea how to do the next bit.

I understand if you don't know either.

Thanks again.
cheers

G
Last edited on
A guess is that BankList should be AccountList, because at the beginning they mention a list of accounts but nothing about a list of banks.

They doesn't mention if you should have a main.cpp file but you should have a main() function. I guess you can put it wherever you want or do as you usually do. I understand it like you should create a Bank object in main() and read customers and accounts from the files and add it to the bank through some member function of Bank (eg. addCustomer(...), addAccount(...)).

1
2
3
4
5
Class BankLL {
                      BankCustomerLL* headByID;	//LL ordered by id 
                      BankCustomerLL* heaadByLastName; //LL ordered by last name 
                      BankAccountLL* headByID;
}


This is what the .h file for bankLinkList looks like according to a demonstrator. Does that mean that the BankLL is just used to search the two other lists?
Topic archived. No new replies allowed.