2020-10-16 04:56:03 +02:00
|
|
|
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;
|
|
|
|
private int capacity;
|
|
|
|
|
2020-10-20 01:33:57 +02:00
|
|
|
public Sedan(double vehicleSize){
|
|
|
|
super(vehicleSize);
|
2020-10-09 21:58:00 +02:00
|
|
|
capacity = 4; //Should make this attr. in vehicle.
|
|
|
|
}
|
|
|
|
|
|
|
|
public boolean isBroken(){ return broken; }
|
|
|
|
public boolean isInAccident(){ return accident; }
|
2020-10-20 11:52:22 +02:00
|
|
|
|
|
|
|
@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 int getCapacity() { return capacity; }
|
|
|
|
|
|
|
|
|
|
|
|
public void fixed() { this.broken = false; this.accident = false; }
|
|
|
|
|
|
|
|
}
|