-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathVehicle.java
61 lines (47 loc) · 967 Bytes
/
Vehicle.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
50
51
52
53
54
55
56
57
58
59
60
61
public class Vehicle {
private int id;
private int year;
private String make;
private String model;
/* default constructor */
public Vehicle() {}
/* constructor */
public Vehicle(int id, int year, String make, String model) {
this.year = year;
this.make = make;
this.model = model;
this.id = id;
}
/* get the vehicle id */
public int getId() {
return id;
}
/* set the vehicle id */
public void setId(int id) {
this.id = id;
}
/* get the vehicle year */
public int getYear() {
return year;
}
/* set the vehicle year */
public void setYear(int year) {
this.year = year;
}
/* get the vehicle make */
public String getMake() {
return make;
}
/* set the vehicle make */
public void setMake(String make) {
this.make = make;
}
/* get the vehicle make */
public String getModel() {
return model;
}
/* set the vehicle make */
public void setModel(String model) {
this.model = model;
}
}