-
Notifications
You must be signed in to change notification settings - Fork 0
/
Car.java
48 lines (39 loc) · 976 Bytes
/
Car.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
abstract class Car {
private String vin;
private String make;
private String model;
private int mileage;
public Car(String vin, String make, String model, int mileage) {
this.vin = vin;
this.make = make;
this.model = model;
this.mileage = mileage;
}
public String getVin() {
return vin;
}
public void setVin(String vin) {
this.vin = vin;
}
public String getMake() {
return make;
}
public void setMake(String make) {
this.make = make;
}
public String getModel() {
return model;
}
public void setModel(String model) {
this.model = model;
}
public int getMileage() {
return mileage;
}
public void setMileage(int mileage) {
this.mileage = mileage;
}
public String getInfo() {
return "VIN: " + vin + ", Make: " + make + ", Model: " + model + ", Mileage: " + mileage;
};
}