- Every subclass of Vehicle needs to return
the max of it self.
- Calculate best case (empty streets) for
a given vehcile using a Route.
32 lines
658 B
Java
32 lines
658 B
Java
|
|
public class Sedan extends CivilVehicle {
|
|
|
|
private String UID;
|
|
private static int numeberOfSedan;
|
|
private final int TIME_TO_FIX = 15; //in minutes
|
|
public static final int MAX_FORWARD = 1500; // Meter/Min
|
|
|
|
public Sedan(double vehicleSize){
|
|
super(vehicleSize);
|
|
generateUID();
|
|
}
|
|
|
|
@Override
|
|
public int getTimeToFix(){ return TIME_TO_FIX; }
|
|
|
|
private void generateUID() {
|
|
numeberOfSedan++;
|
|
this.UID = String.format("Sedan%04d", numeberOfSedan);
|
|
|
|
}
|
|
|
|
public String getUID(){
|
|
return this.UID;
|
|
}
|
|
|
|
@Override
|
|
public int getMaxSpeed() {
|
|
return MAX_FORWARD;
|
|
}
|
|
}
|