Advertisement
desant74268

HW_OOP_Mug

Apr 25th, 2020
382
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.15 KB | None | 0 0
  1. package HW.OOP.SHOP;
  2.  
  3. public class Mug {
  4.     private String type;
  5.     private String color;
  6.     private double volume;
  7.     private String material;
  8.     private double price;
  9.  
  10.     public Mug(String type, String material, String color, double volume, double price) {
  11.         this.type = type;
  12.         this.material = material;
  13.         this.color = color;
  14.         this.volume = volume;
  15.         this.price = price;
  16.     }
  17.  
  18.     public String getType() {
  19.         return type;
  20.     }
  21.  
  22.     public String getMaterial() {
  23.         return material;
  24.     }
  25.  
  26.     public String getColor() {
  27.         return color;
  28.     }
  29.  
  30.     public double getVolume() {
  31.         return volume;
  32.     }
  33.  
  34.     public double getPrice() {
  35.         return price;
  36.     }
  37.  
  38.     public void setType(String type){
  39.         this.type = type;
  40.     }
  41.  
  42.     public void setMaterial(String material) {
  43.         this.material = material;
  44.     }
  45.  
  46.     public void setColor(String color) {
  47.         this.color = color;
  48.     }
  49.  
  50.     public void setVolume(double volume) {
  51.         this.volume = volume;
  52.     }
  53.  
  54.     public void setPrice(double price) {
  55.         this.price = price;
  56.     }
  57. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement