implement all tasks and todos inside SportsCar.java
This commit is contained in:
@@ -23,7 +23,17 @@ public class SportsCar extends GasCar {
|
|||||||
|
|
||||||
this.zeroToHundred = zeroToHundred;
|
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()
|
// TODO: Override showDetails()
|
||||||
// Call super.showDetails()
|
// Call super.showDetails()
|
||||||
// Print acceleration time
|
// Print acceleration time
|
||||||
|
|||||||
Reference in New Issue
Block a user