Java Cart .

Java Cart ItemOfStuffWSizeColor java

package cart;

//ItemOfStuffWsizeColor - an item which has inventory
//author - Lawrence Truett - FluffyCat.com
//date - August 7, 2003 - San Diego, CA
public class ItemOfStuffWSizeColor extends ItemOfStuff {
    String color;
    String size;
    
    public ItemOfStuffWSizeColor(long keyIn, 
                                 double priceIn, 
                                 String descriptionIn,
                                 ItemType typeIn, 
                                 String smallGraphicIn, 
                                 String largeGraphicIn,
                                 String sizeIn, 
                                 String colorIn) {
        super(keyIn,
              priceIn, 
              descriptionIn, 
              typeIn, 
              smallGraphicIn, 
              largeGraphicIn);
        setColor(colorIn);
        setSize(sizeIn);
        setDescription(getSize() + " " + 
                       getColor() + " " + 
                       getDescription());
    }
    
    public String getColor() {return color;}
    void setColor(String colorIn) {
        color = colorIn;
    }
    
    public String getSize() {return size;}
    void setSize(String sizeIn) {
        size = sizeIn;
    }

    public static String getItemClass() {
        return "Stuff With Size and Color Item";
    } 
}
To download source right-click here and "Save As...".
Comments
Sign in to be the first to comment on Java Cart ItemOfStuffWSizeColor java.