commit
4110fc97ac
1
.gitignore
vendored
1
.gitignore
vendored
@ -1 +1,2 @@
|
||||
out/
|
||||
/bin/
|
||||
|
@ -13,7 +13,6 @@ public class Accident {
|
||||
}
|
||||
|
||||
private void setDate(Date date){
|
||||
//TODO: maybe change to Calendar type
|
||||
this.date = date;
|
||||
}
|
||||
|
||||
|
@ -53,7 +53,7 @@ public class Campaign {
|
||||
}
|
||||
|
||||
public void setTimeToLeaveToDest(Date timeToLeaveToDest) {
|
||||
//TODO: check if date is before or after Project Date
|
||||
//TODO: Hesham check if date is before or after Project Date
|
||||
this.timeToLeaveToDest = timeToLeaveToDest;
|
||||
}
|
||||
|
||||
@ -62,7 +62,7 @@ public class Campaign {
|
||||
}
|
||||
|
||||
public void setTimeToLeaveToHousing(Date timeToLeaveToHousing) {
|
||||
//TODO: check if date is before or after Project Date
|
||||
//TODO: Hesham check if date is before or after Project Date
|
||||
this.timeToLeaveToHousing = timeToLeaveToHousing;
|
||||
}
|
||||
|
||||
@ -79,11 +79,11 @@ public class Campaign {
|
||||
}
|
||||
|
||||
public void setVehicles(Vehicle[] vehicles){
|
||||
/*TODO: check if vehicles is not null then set vehicles. */
|
||||
/*TODO: Osama check if vehicles is not null then set vehicles. */
|
||||
}
|
||||
|
||||
public void generateBusses(int number){
|
||||
/*TODO: generate "number" of busses and set them to vehicles array. */
|
||||
/*TODO: Asaad generate "number" of busses and set them to vehicles array. */
|
||||
}
|
||||
|
||||
private void generateUID() {
|
||||
|
9
src/MakkahCity.java
Normal file
9
src/MakkahCity.java
Normal file
@ -0,0 +1,9 @@
|
||||
|
||||
public class MakkahCity {
|
||||
|
||||
public static void main(String[] args) {
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
15
src/SUV.java
Normal file
15
src/SUV.java
Normal file
@ -0,0 +1,15 @@
|
||||
|
||||
public class SUV extends CivilVehicle {
|
||||
|
||||
private final int TIME_TO_FIX = 15; //in minutes
|
||||
|
||||
public SUV(double vehicleSize){
|
||||
super(vehicleSize);
|
||||
}
|
||||
|
||||
public int getTimeToFix(){
|
||||
return TIME_TO_FIX;
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -5,6 +5,7 @@ public class Street {
|
||||
private double length;
|
||||
private int numberOfLanes;
|
||||
private ArrayList<Vehicle> vehicles;
|
||||
|
||||
|
||||
public Street(double length, int numberOfLanes) {
|
||||
setLength(length);
|
||||
@ -37,4 +38,22 @@ public class Street {
|
||||
public ArrayList<Vehicle> getVehicles() {
|
||||
return vehicles;
|
||||
}
|
||||
|
||||
public double capcity() {
|
||||
double totalLength = length * numberOfLanes;
|
||||
//TODO Ammar return (total length - (length of cars + padding))
|
||||
return 0;
|
||||
}
|
||||
|
||||
public boolean canTakeVehicles( Vehicle vehicle ) {
|
||||
if ( vehicle.getVehicleSize() > capcity() )
|
||||
return false;
|
||||
else
|
||||
return true;
|
||||
}
|
||||
|
||||
public void addVehicle( Vehicle vehicle ) {
|
||||
//TODO Ammar
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -9,7 +9,7 @@ public class TrafficPoliceCar extends Vehicle implements CanBeGovtCar, CanFixAcc
|
||||
*/
|
||||
public TrafficPoliceCar(double vehicleSize){
|
||||
super(vehicleSize);
|
||||
//TODO: Set random govtID
|
||||
//TODO: Osamah Set random govtID
|
||||
}
|
||||
|
||||
/**
|
||||
|
15
src/Truck.java
Normal file
15
src/Truck.java
Normal file
@ -0,0 +1,15 @@
|
||||
|
||||
public class Truck extends CivilVehicle {
|
||||
|
||||
private final int TIME_TO_FIX = 20; //in minutes
|
||||
|
||||
public Truck(double vehicleSize){
|
||||
super(vehicleSize);
|
||||
}
|
||||
|
||||
public int getTimeToFix(){
|
||||
return TIME_TO_FIX;
|
||||
}
|
||||
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user