
item58
By:
ace on
Aug 11th, 2010 | syntax:
None | size: 1.10 KB | hits: 18 | expires: Never
/**
* Write a description of class Item here.
*
* @author (your name)
* @version (a version number or a date)
*/
public class Item
{
// instance variables - replace the example below with your own
private int itemWeight;
private String itemDescription;
private String itemName;
/**
* Constructor for objects of class Item
*/
public Item(int itemWeight, String itemDescription, String itemName)
{
// initialise instance variables
this.itemWeight = itemWeight;
this.itemDescription = itemDescription;
this.itemName = itemName;
}
/**
* 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 String getItemDescription()
{
return itemDescription;
}
public int getItemWeight()
{
return itemWeight;
}
public String getItemName()
{
return itemName;
}
}