complete workshop assignments

This commit is contained in:
amirM.t
2026-04-28 09:12:10 +03:30
parent e8aedb8354
commit 1a78323743
7 changed files with 222 additions and 155 deletions
+18 -4
View File
@@ -24,8 +24,22 @@ public class SportsCar extends GasCar {
this.zeroToHundred = zeroToHundred;
}
// TODO: Override showDetails()
// Print header
// Call super.showDetails()
// Print acceleration time
@Override
public void showDetails()
{
super.showDetails();
System.out.println("0-100 km/h Acceleration: " + zeroToHundred + "s");
}
@Override
public boolean needsService(Vehicle v)
{
return v.getMileage() > 5000;
}
@Override
public void performService()
{
System.out.println("High-performance brake system checked");
}
}