Hajj-simulation/src/Sedan.java

32 lines
631 B
Java
Raw Normal View History

import java.util.Date;
2020-10-09 21:58:00 +02:00
public class Sedan extends Vehicle implements Breakable {
private final int TIME_TO_FIX = 15; //in minutes
private boolean broken;
private boolean accident;
public Sedan(double vehicleSize){
super(vehicleSize);
2020-10-09 21:58:00 +02:00
}
public boolean isBroken(){ return broken; }
public boolean isInAccident(){ return accident; }
@Override
public void collide(Breakable car, Date time) {
}
@Override
public void _break(Date time) {
}
2020-10-09 21:58:00 +02:00
public int getTimeToFix(){ return TIME_TO_FIX; }
public void fix() { this.broken = false; this.accident = false; }
2020-10-09 21:58:00 +02:00
}