implement all tasks and todos inside SportsCar.java

This commit is contained in:
2026-04-27 20:48:25 +03:30
parent e9168db124
commit 16f4df1165
+10
View File
@@ -23,7 +23,17 @@ public class SportsCar extends GasCar {
this.zeroToHundred = zeroToHundred;
}
public boolean needsService(Vehicle v) {
return v.getMileage() > 5000;
}
public void performService() {
System.out.println("High-performance brake system checked");
}
public void showDetails() {
super.showDetails();
System.out.println("Acceleration time: " + this.zeroToHundred);
}
// TODO: Override showDetails()
// Call super.showDetails()
// Print acceleration time