Advertisement
desant74268

HW_OOP_Kettle

Apr 25th, 2020
444
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.03 KB | None | 0 0
  1. package HW.OOP.SHOP;
  2.  
  3. public class Kettle {
  4.     private String model;
  5.     private double volume;
  6.     private String color;
  7.     private double powerConsumption;
  8.  
  9.  
  10.     public Kettle(String model, String color, double volume, double powerConsumption) {
  11.         this.model = model;
  12.         this.color = color;
  13.         this.volume = volume;
  14.         this.powerConsumption = powerConsumption;
  15.     }
  16.  
  17.     public String getModel() {
  18.         return model;
  19.     }
  20.     public String getColor(){
  21.         return color;
  22.     }
  23.     public double getVolume() {
  24.         return volume;
  25.     }
  26.     public double getPowerConsumption() {
  27.         return powerConsumption;
  28.     }
  29.  
  30.     public void setVolume(double volume) {
  31.         this.volume = volume;
  32.     }
  33.  
  34.     public void setColor(String color) {
  35.         this.color = color;
  36.     }
  37.  
  38.     public void setModel(String model) {
  39.         this.model = model;
  40.     }
  41.  
  42.     public void setPowerConsumption(double powerConsumption) {
  43.         this.powerConsumption = powerConsumption;
  44.     }
  45. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement