NaoDesu

Item

Feb 20th, 2017
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.09 KB | None | 0 0
  1. package resources;
  2.  
  3. public class Item {
  4.     //this class contains Item properties and for access item list
  5.     private String itemID, name, type, price, desc;
  6.    
  7.     public Item(String itemID,String type,String name,String price,String desc){ //arg constructor
  8.         this.itemID = itemID;
  9.         this.name = name;
  10.         this.type = type;
  11.         this.price = price;
  12.         this.desc = desc;
  13.     }
  14.  
  15.     public Item(){ //default constructor
  16.        
  17.     }
  18.    
  19.     //getter method string and return current value
  20.     public String getItemID() {
  21.         return itemID;
  22.     }
  23.    
  24.     public String getName() {
  25.         return name;
  26.     }
  27.  
  28.     public String getType() {
  29.         return type;
  30.     }
  31.  
  32.     public String getPrice() {
  33.         return price;
  34.     }
  35.    
  36.     public String getDesc() {
  37.         return desc;
  38.     }
  39.    
  40.     //setter method void and set new value
  41.     public void setItemID(String itemID) {
  42.         this.itemID = itemID;
  43.     }  
  44.    
  45.     public void setName(String name) {
  46.         this.name = name;
  47.     }
  48.    
  49.     public void setType(String type) {
  50.         this.type = type;
  51.     }
  52.  
  53.     public void setPrice(String price) {
  54.         this.price = price;
  55.     }
  56.  
  57.     public void setDesc(String desc) {
  58.         this.desc = desc;
  59.     }
  60.    
  61. }
Advertisement
Add Comment
Please, Sign In to add comment