-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathTestCarTruck.java
More file actions
39 lines (23 loc) · 1.14 KB
/
Copy pathTestCarTruck.java
File metadata and controls
39 lines (23 loc) · 1.14 KB
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
public class TestCarTruck {
public static void main(String[] args) {
Vehicle bencar = new Car("Green",true);
Vehicle petetruck = new Truck("Orange",true);
System.out.println(bencar.toString());
System.out.println(petetruck.toString());
GarageTester gt = new GarageTester();
System.out.println("Garage Tester: "+gt.getExample());
Customer nc1 = new Customer("jack","Kampala");
Customer nc2 = new Customer("Kinobe","Toronto");
Vehicle chevroletCar = new Car("Purple",true);
//CarRentalContract cc2 = new CarRentalContract(nc1,bencar);
CarRentalContract cc3 = new CarRentalContract(nc2,chevroletCar);
CarRental cr = new CarRental();
cr.addContract(cc3);
//cr.addContract(cc2);
// for (int i=1; i<=CarRental.rentObjects; i++){
// System.out.println(cr.displayContracts());
// }
System.out.println("My Contracts:");
System.out.println(cr.displayContracts());
}
}