-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathStorage.java
49 lines (41 loc) · 1.06 KB
/
Storage.java
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
public class Storage implements Component{
private String brand;
private int capacity;
private int id;
private String type;
private double price;
public Storage(String brand, int capacity, String type, double price,int id) {
this.brand = brand;
this.capacity = capacity;
this.type = type;
this.price = price;
this.id = id;
}
public String getBrand() {
return brand;
}
public int getId(){
return id;
}
public int getCapacity() {
return capacity;
}
public String getType() {
return type;
}
public double getPrice() {
return price;
}
public void setPrice(double price) {
this.price = price;
}
@Override
public String toString() {
return "Storage{" +
"brand='" + brand + '\'' +
", capacity=" + capacity +
"GB, type='" + type + '\'' +
", price=" + price +
'}';
}
}