Advertisement
desant74268

HW_OOP_Fridge

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