Advertisement
Guest User

Untitled

a guest
Jul 17th, 2018
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.81 KB | None | 0 0
  1. public class Clothing{
  2.     private int itemID = 0;
  3.     private String desc = "-description required-";
  4.     private char colorCode = 'U';
  5.     private double price = 0.0;
  6.  
  7.     // Constructor
  8.    
  9.     public Clothing(int itemID, String desc, char color, double price){
  10.         this.itemID = itemID;
  11.         this.desc = desc;
  12.         this.colorCode = color;
  13.         this.price = price;
  14.     }
  15.    
  16.     public void setItemID(int ID){
  17.         itemID = ID;
  18.     }
  19.    
  20.     public int getItemID(){
  21.         return itemID;
  22.     }
  23.    
  24.     public void setDesc(String descs){
  25.         desc = descs;
  26.     }
  27.    
  28.     public String getDesc(){
  29.         return desc;
  30.     }
  31.    
  32.     public void setColor(char colors){
  33.         color = colors
  34.     }
  35.    
  36.     public char getColor(){
  37.         return color;
  38.     }
  39.    
  40.     public void setPrice(double prices){
  41.         price = prices;
  42.     }
  43.     public double getPrice(){
  44.         return price;
  45.     }
  46.    
  47.    
  48.    
  49. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement