forked from ChathuminaVimukthi/Object-Oriented-Programing
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCar.java
More file actions
32 lines (23 loc) · 639 Bytes
/
Car.java
File metadata and controls
32 lines (23 loc) · 639 Bytes
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
package vehicle.park;
public class Car extends Vehicle{
private int numofDoors;
private String color;
public Car(String vehicleId, String vehicleBrand, String vehicleType, int year, int month, int date, int hours,
int numofDoors, String color) {
super(vehicleId, vehicleBrand, vehicleType, year, month, date, hours);
this.numofDoors = numofDoors;
this.color = color;
}
public int getNumofDoors() {
return numofDoors;
}
public void setNumofDoors(int numofDoors) {
this.numofDoors = numofDoors;
}
public String getColor() {
return color;
}
public void setColor(String color) {
this.color = color;
}
}