2020-10-21 04:42:45 +02:00
|
|
|
import java.util.Date;
|
|
|
|
|
2020-10-20 01:33:57 +02:00
|
|
|
public class Campaign {
|
2020-10-09 21:22:37 +02:00
|
|
|
|
2020-11-06 17:21:46 +01:00
|
|
|
private String UID;
|
|
|
|
//private int housingNumber;
|
2020-10-09 21:22:37 +02:00
|
|
|
private String name;
|
2020-11-06 17:21:46 +01:00
|
|
|
private District hotelDistrict;
|
2020-10-09 21:22:37 +02:00
|
|
|
|
2020-10-21 04:42:45 +02:00
|
|
|
private Route housingToDestRoute;
|
|
|
|
private Route destToHousingRoute;
|
|
|
|
|
|
|
|
private Vehicle[] vehicles;
|
|
|
|
|
|
|
|
//Will be of type PDate after extention
|
|
|
|
private Date timeToLeaveToDest;
|
|
|
|
private Date timeToLeaveToHousing;
|
|
|
|
|
2020-11-06 17:21:46 +01:00
|
|
|
private static int numeberOfCampains;
|
|
|
|
|
|
|
|
public Campaign(String name, District hotelDistrict) {
|
|
|
|
numeberOfCampains++;
|
2020-10-21 04:42:45 +02:00
|
|
|
this.name = name;
|
2020-11-06 17:21:46 +01:00
|
|
|
this.hotelDistrict = hotelDistrict;
|
|
|
|
this.UID = String.format("%4d", numeberOfCampains);
|
2020-10-21 04:42:45 +02:00
|
|
|
}
|
2020-10-09 21:22:37 +02:00
|
|
|
|
|
|
|
public Campaign(int numberOfPeople){
|
|
|
|
|
2020-10-21 04:42:45 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
public Route getHousingToDestRoute() {
|
|
|
|
return housingToDestRoute;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setHousingToDestRoute(Route housingToDestRoute) {
|
|
|
|
this.housingToDestRoute = housingToDestRoute;
|
|
|
|
}
|
|
|
|
|
|
|
|
public Route getDestToHousingRoute() {
|
|
|
|
return destToHousingRoute;
|
|
|
|
}
|
2020-10-09 21:22:37 +02:00
|
|
|
|
2020-10-21 04:42:45 +02:00
|
|
|
public void setDestToHousingRoute(Route destToHousingRoute) {
|
|
|
|
this.destToHousingRoute = destToHousingRoute;
|
2020-10-09 21:22:37 +02:00
|
|
|
}
|
|
|
|
|
2020-10-21 04:42:45 +02:00
|
|
|
public int getNumberOfBusses() {
|
|
|
|
int busses = 0;
|
|
|
|
for (Vehicle vehicle : vehicles){
|
|
|
|
if (vehicle instanceof Bus) busses++;
|
|
|
|
}
|
|
|
|
return busses;
|
2020-10-09 21:22:37 +02:00
|
|
|
}
|
2020-11-06 17:21:46 +01:00
|
|
|
|
|
|
|
public void setVehicles(Vehicle[] vehicles){
|
|
|
|
/*TODO
|
|
|
|
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.
|
|
|
|
*/
|
|
|
|
}
|
2020-10-09 21:22:37 +02:00
|
|
|
}
|