complete project
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user