Commit Graph

7 Commits

Author SHA1 Message Date
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
eb94de2754 Remake Vehicle classes
- Abstract class CivilVehicle that implements Breakable and
	contains all common fields of vehicles. Now for example,
	Sedan <- CivilVehicle <- Vehicle
		      ^
		  Breakable
	The breakable methods are mostly implemented in CivilVehicle
	Except getTimeToFix() which is defined in subclasses of
	CivilVehicle.

	- Breakable interface:
	The method collide() now returns instance of Accident instead of
	void

Signed-off-by: HeshamTB <hishaminv@gmail.com>
2020-10-21 11:35:19 +03:00
49f7be0ceb Campaign update:
- Remove fields as discussed in first project meeting
	- Add 2 Routes to each object with get/set

Signed-off-by: HeshamTB <hishaminv@gmail.com>
2020-10-21 05:42:45 +03:00
2c6721c89a
Merge branch 'master' of https://github.com/HeshamTB/Hajj-simulation into master 2020-10-20 12:52:22 +03:00
97620bce11
Use packages/folders for grouped classes 2020-10-16 07:27:40 +03:00
de0331088f
Restructer and add CanFixAccident
- Move Capacity field to Vehicle class
	- Improve Breakable interface
2020-10-16 05:56:03 +03:00
3dbb440370
Added Vehicle data structure 2020-10-09 22:58:00 +03:00