Skip to content

Commit 4eda61b

Browse files
committed
implement solution
1 parent f173003 commit 4eda61b

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

Rental.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,15 @@ public void addAllVehicles(Vehicle... vehicles) {
2020
}
2121
}
2222

23+
public void transformAllTrucks() {
24+
for (Vehicle c : vehicles) {
25+
if (c instanceof Truck) {
26+
Truck t = (Truck) c;
27+
t.transform();
28+
}
29+
}
30+
}
31+
2332
public void print() {
2433
System.out.println(name);
2534
System.out.println("Unsere Fahrzeuge: ");

0 commit comments

Comments
 (0)