-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDriver.java
50 lines (36 loc) · 1.12 KB
/
Driver.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
import java.io.Serializable;
public abstract class Driver implements Serializable {
private String driverName;
private String driverLocation;
private int age;
private String id;
public Driver() {
}
public Driver(String driverName, String driverLocation, int age) { // (constructor)
this.driverName = driverName;
this.driverLocation = driverLocation;
this.age = age;
}
@Override
public String toString() {
return
"driverName='" + driverName + '\'' +
", driverLocation='" + driverLocation + '\'' +
", age=" + age;
}
public String getDriverLocation() { // get Diver Location
return driverLocation;
}
public void setDriverLocation(String driverLocation) { // use setters and set Diver Location
this.driverLocation = driverLocation;
}
public String getDriverName() {
return driverName;
}
public void setDriverName(String driverName) {
this.driverName = driverName;
}
public void setId(String id) {
this.id = id;
}
}