HeshamTB
f8b5e79187
Add Street Object for Accident as location for Instances of Accident. Removed 'isInAccident()' from 'Breakable' interface The idea is from Previous suggested UML that replaces Broken and Accident with getStatus() that gives info about Breakable object. isBroken() now returns 1 if its eaither in Accident or Broken. Can check getCurrentAccident() for null. Signed-off-by: HeshamTB <hishaminv@gmail.com> Signed-off-by: HeshamTB <hishaminv@gmail.com>
12 lines
214 B
Java
12 lines
214 B
Java
import java.util.Date;
|
|
|
|
public interface Breakable {
|
|
|
|
int getTimeToFix();
|
|
boolean isBroken();
|
|
Accident collide(Breakable car, Date time, Street location);
|
|
void _break(Date time);
|
|
void fix();
|
|
|
|
}
|