/** * This is parent class of items found around the house * * Joe Rivard * 4/13/03 */ import java.io.*; public abstract class Items implements Serializable { String description; //Name of item String use; //the use of the item boolean grabbed; //returns true if item is grabbed /** * constructor method */ public Items() { description = ""; use = ""; grabbed = false; } /** * grabs an items and sets its boolean value to true * @param boolean, if item is grabbed */ public void grab(boolean a) { grabbed = a; } /** * returns the name of the item * @return String , the name of the item */ public String getDescription() { return description; } /** * returns the use of the item * @return String , the use of the item */ public String getUse() { return use; } /** * returns whether item is grabbed * @return boolean, true if item is grabbed */ public boolean isGrabbed() { return grabbed; } }