-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGarage.java
More file actions
23 lines (19 loc) · 829 Bytes
/
Garage.java
File metadata and controls
23 lines (19 loc) · 829 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
/**
* Created by Max on 05.11.2016.
*/
public class Garage {
public static void main(String[] args) {
Car audi = new Car("Audi");
ElectricCar tesla = new ElectricCar("Tesla", 100);
Motorcycle harley = new Motorcycle("Harley");
System.out.println(audi);
System.out.println("Tax needed: " + audi.isTaxNeeded());
System.out.println("Number of wheels: " + audi.getNumberOfWheels());
System.out.println(tesla);
System.out.println("Tax needed: " + tesla.isTaxNeeded());
System.out.println("Number of wheels: " + tesla.getNumberOfWheels());
System.out.println(harley);
System.out.println("Tax needed: " + harley.isTaxNeeded());
System.out.println("Number of wheels: " + harley.getNumberOfWheels());
}
}