
/**
 * Items class for keeping track of inventories
 * 
 * @author Kathryn
 * @version Oct 10, 2005
 */
public class Items
{
    static int totalItems = 0;
    
    // instance variables 
    private int myAmount;
    private String myName;

    /**
     * Constructor for objects of class Items
     */
    public Items()
    {
        // initialise instance variable
  
    }

    /**
     * Constructor for objects of class Items
     * @param name - a string that tell us about the object
     *        amount - is the initial number of name
     */
    public Items(String name, int amount)
    {
        // initialise instance variables
 
        myName = name;
        myAmount = amount;
    }

    /**
     * An example of a method - replace this comment with your own
     * 
     * @param  y   a sample parameter for a method
     * @return     the sum of x and y 
     */
    public void setName(String name)
    {
        // put your code here
        this.myName = name;
    }
    public String getName()
    {
        // put your code here
        return this.myName;
    }
    public void setAmount(int amount)
    {
        // put your code here
        this.myAmount = amount;
    }
    public int getAmount()
    {
        // put your code here
        return myAmount;
    }
    public String toString() {
        return myAmount + ": " + myName + " apples.";
    }

}
