Hajj-simulation/src/Sedan.java
HeshamTB ee94355f42
Method in route getFastestTimeOfTravel(Vehicle):
- Every subclass of Vehicle needs to return
    the max of it self.

    - Calculate best case (empty streets) for
    a given vehcile using a Route.
2020-11-23 01:20:48 +03:00

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;
}
}