Computer Science 122
Assignment 8
Due: November 20, 2003

This time you are to combine two of your product lists.  I will make suggestions of which ones could go together.  Keep the same products in the lists, but make sure that the id and price are the first things listed about your products.  Each product in the file should be preceded by the common name for the product, such as Cadillac, Poster, CD, etc.  See the example that involves fruits and vegetables.

As in assignment 7, have two frames, one main frame that is used to display the products and a second one to find a specific product given the ID.  Also, divide your program into separate files, all in the same package.

You should have a Product class that your specific product classes extend.  The Product class should store the type of the product, the id, and the price.  All the other data fields should remain in the specific product classes.  The fields in the Product class should be protected, while those in the subclasses should be private.

Be careful when creating the combined list that the data occurs in the same order as it is to be read.  This might be somewhat different from the order that you have been using.  In particular, you may have been reading the price last, but if it is to be in the super-class, it must be read right after the type and the id.

You should get a copy of the other person’s list and make it part of your data file.  If you want, you may work with that person and hand in one program with both of your names on it.  You may also work alone if you wish, but you should still get the data from the other student.