Hajj-simulation/src/Breakable.java
HeshamTB f8b5e79187 Add ref to street in every Accident
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>
2020-11-06 22:36:01 +03:00

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