. Java Cart . Java Cart ItemOfStuffWSizeColor java
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";
}
}
download source, use right-click and "Save Target As..." to save with a .java extension.
| Sign In |
| to add the first comment for Java Cart ItemOfStuffWSizeColor java. |