Due: 10-16-2014Project 3Points: 45Vectors and Lists

A detective office wants to keep a list of clients with their associated cases. For the client information use

LastName, FirstName, Address, ZipCode, EmailAddr, Cases[ ]

where Cases[ ] means that you can have a variable number of cases for this client.

Each case needs the following information:

CaseDesc, StartDate, EndDate, Rate,EstHours, ActHours

Use the list container for the clients and the vector container for the cases. Use the string class rather than char arrays for the text fields.

You need to write an interface class that will invoke code for adding, removing, and retrieving a client’s information. To find a client, use the last name; you have to deal with several client records matching the requested last name. For a given client, you should be able to find the case(s) with a term in the CaseDesc field. You should have a mechanism to print each client and to print each case. Obviously, the client’s print routine would call the case’s print routine for each case stored under that client. When printing the case information include the calculated total charge for the case. If ActHours not filled in, use the EstHours value in calculating the total charge for the case. Your user interface should be able to show the total charges for all cases.

I would like you to be able to sort the clients by LastName and the cases by StartDate. You also need to show code for adding, removing, and retrieving a case for a specific client.

I would also like you to your Date class from Project 1 to store these dates. Make sure it has an operator< defined since this is needed by the sort.

list<Client>

Brown | Bill | 25 Main St | 60085 | | vector<Case>

Suspect Joe Lucky of pilfering | 5/13/09 | 5/30/09 | 35.00 | 12 | 9.75

Barb Lowdown skimming | 6/2/09 | 7/13/09 | 40.00 | 20 | 22

Murphy | Leslie | 1810 State St | 60092 | | vector<Case>

Husband spend too much time at work | 5/18/09 | 6/23/09 | 30.00 |25 | 21

Rubric for Project 3
Item / Description / Points
1 / Client class with 5 fields andthe vector for cases / 7
2 / operator< on last name on Client class / 2
3 / print client routine / 2
4 / Find client by last name, operator == / 2
5 / Sort by last name / 1
6 / Case class with 6 fields, two being Date objects / 7
7 / operator< on startdate for Case class / 2
8 / print case routine / 2
9 / Search term in description / 2
10 / Sort by start date / 1
11 / List of clients as class or separate object / 2
12 / User interface class / 3
13 / add, remove, find by last name, list, listall clients / 5
14 / Add, remove, find by term, list / 4
15 / exception handling / 3
Total / 45

John North1Fall 2014