Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * 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 boolean itemExists;
- /**
- * Constructor for objects of class Item
- */
- public Item(int itemWeight, String itemDescription)
- {
- // initialise instance variables
- this.itemWeight = itemWeight;
- this.itemDescription = itemDescription;
- itemExists = true;
- }
- /**
- * 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 giveItemDescription()
- {
- return itemDescription;
- }
- }
Add Comment
Please, Sign In to add comment