-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLaptop.java
More file actions
67 lines (58 loc) · 1.54 KB
/
Laptop.java
File metadata and controls
67 lines (58 loc) · 1.54 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
57
58
59
60
61
62
63
64
65
package MyMethods;
public class Laptop{
int id;//порядковый номер
String manufacturer;//производитель
int releaseyear;//год выпуска
String color;//цвет
int weight;//вес в кг
int ram;//в gb
int hdd;// в gb
String os;
public Laptop(int id, String manufacturer, int releaseyear, String color, int weight, int ram, int hdd, String os) {
this.id = id;
this.manufacturer = manufacturer;
this.releaseyear = releaseyear;
this.color = color;
this.weight = weight;
this.ram = ram;
this.hdd = hdd;
this.os = os;
}
public int getId() {
return id;
}
public String getColor() {
return color;
}
public int getReleseyear() {
return releaseyear;
}
public int getWeight() {
return weight;
}
public int getStorage() {
return hdd;
}
public int getRam() {
return ram;
}
public String getOs() {
return os;
}
public String getManufacturer() {
return manufacturer;
}
@Override
public String toString() {
return "Ноутбук {" +
"id='" + id + '\'' +
", manufacturer=" + manufacturer +
", releaseyear=" + releaseyear +
", color=" + color +
", weight=" + weight +
", ram=" + ram +
", hdd=" + hdd +
", os='" + os + '\'' +
'}';
}
}