Description
Modify project 1 as follows
1. Change the representation for the ProduceItems in the database from an array to a linked list of
ProduceItems. The linked list should have a first and last pointer and a length as shown in
lecture. There shouldn’t be a need to modify how your program interacts with the database.
That is, the method signatures remain the same; only the internal representation for storing the
ProduceItems changes.
2. Create a class hierarchy for ProduceItem where Fruit and Vegetable are subclasses of
ProduceItem. Make ProduceItem abstract. The input file will now indicate if the code number is
for a Fruit or a Vegetable by having a ‘F’ or ‘V’ as the first field:
F,4088,Apple,1.69
V,3023,Carrot,0.99
3. Include appropriate Javadoc in the classes for the database, ProduceItem, Fruit and Vegetable.
4. Use a DecimalFormat object, if you haven’t already done so, to print the total bill for the
customer using only two decimal places.
Program Submission
Since there are even more files to submit than in Project 1, create a JAR (JAVA Archive) file using
Eclipse which, similar to a .zip file will contain all the .java files you are to submit for this project.
Instructions for using Eclipse to create a .jar file are on Blackboard.
The program is due by midnight on the date indicated at the top of this handout, and will not be
accepted after the cutoff date. The date of submission to Bb is the official date for your project.