hey there,

i have recently started a java program for uni, and have a rough idea of where to start but need a wee nudge in the right direction.

the program is for a company who sell tables chairs etc, and i have to implement the part of the system that enables the buyer to maintain the comapnys catalogue.

all i need to knwo is if the code i have done previously for a similar project for updating a cd collection can be used to help me here.


i have put the code for the cd collection program in a word file for you to have a look at
if you think i can base my new program kon this let me know as i am stumped.

many thanks
muddpigeon

If all you need is a catalog and not maintain an inventory, then really all you need is a list of objects. Your CD collection looks ok, but I probably wouldn't have broken down the CD's attributes as much as you have.

I would make a class called Item that contains all the attributes needed.

name
size[] (s,m,l)
weight[] (could depend on size selected)
colors[] (blue,black,red)

Possibly then store the items in a HashMap, where the key is the item ID. May even want to consider putting the item ID in the Item class itself, and then just keep a sorted List instead and use your own binary search to find queried items.