Advertisement
desant74268

HW_OOP_Lamp

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