matin mortazavi / I debugged the code. The issue was that it couldn’t recognize the file paths

This commit is contained in:
Matin
2026-04-28 10:07:50 +04:30
parent d78e46b957
commit 2547e8eef1
11 changed files with 70 additions and 9 deletions
+52
View File
@@ -0,0 +1,52 @@
package org.model;
/*
* SportsCar extends GasCar.
*
* Special service logic for SportsCar:
* - needsService(): return true if mileage > 5000
* - performService():
* Print "High-performance brake system checked"
*/
public class SportsCar extends org.model.GasCar {
private double zeroToHundred;
public SportsCar(String brand, String model, int year,
double mileage, int seats,
double fuelLevel, String fuelType,
double zeroToHundred) {
super(brand, model, year, mileage, seats,
fuelLevel, fuelType);
this.zeroToHundred = zeroToHundred;
}
@Override
public boolean needsService(org.model.Vehicle v)
{
return this.GetMileage() > 5000 ;
}
@Override
public void performService()
{
System.out.println("High-performance brake system checked") ;
}
@Override
public void showDetails()
{
System.out.println("*details*");
super.showDetails() ;
System.out.println("0 --> 100 " + zeroToHundred) ;
}
// TODO: Override showDetails()
// Print header
// Call super.showDetails()
// Print acceleration time
}