Hi guys need some input on my coursework
brief description of what I have to do:
I need to create a system that quotes a price when a customer specifies what type of box they want.
they have to specify the following:
• The size of the box (width, length, and height);
• The grade of card;
• Whether they want any colour printing (no colour, or 1, or 2 colour printing);
• Whether they want any bottom and/or corner reinforcement;
• Whether the box has a sealable top;
• The quantity of boxes
once all this information has been inputed the system should then be able to tell us if the company (flexbox) can supply the box depending if the specifications meet those in the table(ill attach the tables)
if the company can supply it the system needs to calculate the cost
if it cant supply it an appropriate message should be posted
the code has to have a OOD approach(abstraction, inheritance and polymorphism) and create a class hierarchy that describes the types of boxes sold.
it also needs a gui but the lecturer said get the logic working before implementing a gui
So far I've only been able to do the class the gets the Width, length and height
public class FlexboxSize{ private int Length; private int Width; private int Height; private int Area; public FlexboxSize(){ Length = 0; Width = 0; Height = 0; } public FlexboxSize(int length, int width, int height){ Length = length; Width = width; Height = height; } public int getLength(){ return Length; } public void setLength(int length){ Length = length; } public int getWidth(){ return Width; } public void setWidth(int width){ Width = width; } public int getHeigth(){ return Height; } public void setHeight(int height){ Height = height; } public int areaOfBox(){ return Area = Width * Height * Length; } public String toString(){ return "Length = " + Length + " Width = " + Width + " Height = " + Height; } }
I have created other class's but keep getting the feeling the way im going about it is wrong
can someone advise me on how to go about this
what steps to take next
Ive tried a couple approaches but they all don't seem to be right