$15.00 CustomerHistory assignment
- From Computer-Science: Object-Oriented-Programming
- Closed, but you can still post tutorials
- Due on Nov. 09, 2009
- Asked on Oct 28, 2009 at 11:28:41PM
Q:I have my code but it has an error. I need help. Below is the assignment.
Develop an application that will read and process customer history order information from an input text file, to determine total spent for each customer. The application will print a report of all customers and the total each spent. The report will be ordered by customer id.
Each record of the text file contains a customer ID, order number, and total of order. An example customer order file:
10051 1234567 150.00
10052 1234568 200.00
10051 1234569 120.00Customer id should be the first field, order number should be the second field, and the amount of the order in dollars and cents (no commas) should be the third field. White spaces (no commas) should be used as the delimiter between each field and each customer order record should be in a separate line. Your file may be used as input to a future application which is why the format is important.
The file can contain several entries for the same customer ID. Your application should accumulate the total spent for each customer as you read the order information from the file. The application should print total spent for each customer to the screen using natural ordering of the customer id.
Refer to the various Lists, Sets, Maps, and Queues provide by the Sun Java API. Determine which data structure provided by the Java APIwould be the best choice for your application. Your grade will be based on your use of the class selected and your ability to select the most appropriate class to use based on the stated requirements.
Attachments:CustomerHistory.zip (19K)



