complete project

This commit is contained in:
2026-05-04 00:39:09 +03:30
parent 6cb8f9a8d8
commit 93b96c63a7
7 changed files with 218 additions and 147 deletions
+16 -1
View File
@@ -24,7 +24,22 @@ public class SportsCar extends GasCar {
this.zeroToHundred = zeroToHundred;
}
// TODO: Override showDetails()
public boolean needsService(Vehicle v){
if(v.getMileage() > 5000) {
return true;
}
return false;
}
public void performService(){
System.out.println( "High-performance brake system checked");
}
public void showDetails(){
super.showDetails();
System.out.println("| acceleration :" + this.zeroToHundred);
}
// Call super.showDetails()
// Print acceleration time
}