Class Item

java.lang.Object
  extended by Item

public class Item
extends java.lang.Object

Represents an item which can be used by a player

Version:
1.0

Constructor Summary
Item(java.lang.String description)
          Constructor for objects of type Item
 
Method Summary
 java.lang.String getDescription()
          Returns the description of the item
 void setDescription(java.lang.String description)
          Sets the value of description
 java.lang.String toString()
          Returns a String representation of this object
 void use()
          Use the item
 
Methods inherited from class
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Item

public Item(java.lang.String description)
Constructor for objects of type Item

Parameters:
description - value for the description
Method Detail

getDescription

public java.lang.String getDescription()
Returns the description of the item

Returns:
the description

setDescription

public void setDescription(java.lang.String description)
Sets the value of description

Parameters:
description - the new value of description

toString

public java.lang.String toString()
Returns a String representation of this object

Overrides:
toString in class java.lang.Object
Returns:
a String represention of this object

use

public void use()
Use the item