Pastebin launched a little side project called HostCabi.net, check it out ;-)Don't like ads? PRO users don't see any ads ;-)
Guest

item58

By: ace on Aug 11th, 2010  |  syntax: None  |  size: 1.10 KB  |  hits: 18  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1.  
  2. /**
  3.  * Write a description of class Item here.
  4.  *
  5.  * @author (your name)
  6.  * @version (a version number or a date)
  7.  */
  8. public class Item
  9. {
  10.     // instance variables - replace the example below with your own
  11.     private int itemWeight;
  12.     private String itemDescription;
  13.     private String itemName;
  14.     /**
  15.      * Constructor for objects of class Item
  16.      */
  17.     public Item(int itemWeight, String itemDescription, String itemName)
  18.     {
  19.         // initialise instance variables
  20.        this.itemWeight = itemWeight;
  21.        this.itemDescription = itemDescription;
  22.        this.itemName = itemName;
  23.     }
  24.  
  25.     /**
  26.      * An example of a method - replace this comment with your own
  27.      *
  28.      * @param  y   a sample parameter for a method
  29.      * @return     the sum of x and y
  30.      */
  31.     public String getItemDescription()
  32.     {
  33.         return itemDescription;
  34.        
  35.     }
  36.    
  37.     public int getItemWeight()
  38.         {
  39.             return itemWeight;
  40.         }
  41.        
  42.     public String getItemName()
  43.         {
  44.             return itemName;
  45.         }
  46.        
  47.        
  48. }