-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBed.java
More file actions
34 lines (28 loc) · 742 Bytes
/
Copy pathBed.java
File metadata and controls
34 lines (28 loc) · 742 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
public class Bed {
private double hight;
private int pillowAmount;
private String color;
private int price;
private static final int DEFAULT_PRICE = 100;
public Bed(String color,int pillowAmount,double hight,int price){
this.color = color;
this.hight = hight;
this.pillowAmount = pillowAmount;
this.price = price;
}
public Bed(double hight,String color){
this(color,1,hight,DEFAULT_PRICE);
}
public double getHight() {
return hight;
}
public int getPillowAmount() {
return pillowAmount;
}
public String getColor() {
return color;
}
public void changeColor (String color){
this.color = color;
}
}