-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBed.java
More file actions
56 lines (44 loc) · 1.13 KB
/
Copy pathBed.java
File metadata and controls
56 lines (44 loc) · 1.13 KB
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
public class Bed {
private double height;
private int pillows;
private String sheetColor;
private double price;
private static final double PRICE = 100.0;
private static final int PILLOWS= 1;
public Bed(int pillows, double height, String sheetColor){
this.height = height;
this.pillows = pillows;
this.sheetColor = sheetColor;
this.price = price();
}
public Bed( double height, String sheetColor){
this(PILLOWS,height,sheetColor);
}
private double price() {
return 0;
}
public double getHeight() {
return height;
}
public double getPrice() {
return price;
}
public void setPrice(double price) {
this.price = price;
}
public int getPillows() {
return pillows;
}
public String getSheetColor() {
return sheetColor;
}
public void setHeight(double height) {
this.height = height;
}
public void setPillows(int pillows) {
this.pillows = pillows;
}
public void setSheetColor(String sheetColor) {
this.sheetColor = sheetColor;
}
}