-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathVehicle.java
62 lines (49 loc) · 1.25 KB
/
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
62
public class Vehicle {
private String make;
private String model;
private String color;
private int year;
private String lPlate;
Vehicle(String make, String model, String color, int year, String lPlate) {
setMake(make);
setModel(model);
setColor(color);
setYear(year);
setLPlate(lPlate);
}
public String getMake() {
return this.make;
}
public void setMake(String make) {
this.make = make;
}
public String getModel() {
return this.model;
}
public void setModel(String model) {
this.model = model;
}
public String getColor() {
return this.color;
}
public void setColor(String color) {
this.color = color;
}
public int getYear() {
return this.year;
}
public void setYear(int year) {
this.year = year;
}
public String getLPlate() {
return this.lPlate;
}
public void setLPlate(String lPlate) {
this.lPlate = lPlate;
}
public String getInfo() {
String x = "Make: " + this.make + "\nModel: " + this.model + "\nYear: " + this.year
+ "\nColor: " + this.color + "\nLicense Plate: " + this.lPlate;
return x;
}
}