Use packages/folders for grouped classes
This commit is contained in:
parent
ab9e26f9ab
commit
97620bce11
@ -1,3 +0,0 @@
|
|||||||
public interface CanFixAccident {
|
|
||||||
//void attendToAccident(Accident accident);
|
|
||||||
}
|
|
@ -1,3 +1,5 @@
|
|||||||
|
package ee364.hajj;
|
||||||
|
|
||||||
public enum Gender {
|
public enum Gender {
|
||||||
MALE,
|
MALE,
|
||||||
FEMALE
|
FEMALE
|
@ -1,3 +1,5 @@
|
|||||||
|
package ee364.hajj;
|
||||||
|
|
||||||
public enum Priority {
|
public enum Priority {
|
||||||
HIGH,
|
HIGH,
|
||||||
MID,
|
MID,
|
@ -1,3 +1,7 @@
|
|||||||
|
package ee364.hajj.group;
|
||||||
|
|
||||||
|
import ee364.hajj.Priority;
|
||||||
|
|
||||||
public class Campaign implements PermitedForHaj {
|
public class Campaign implements PermitedForHaj {
|
||||||
|
|
||||||
private int UID;
|
private int UID;
|
@ -1,3 +1,5 @@
|
|||||||
|
package ee364.hajj.group;
|
||||||
|
|
||||||
public interface PermitedForHaj {
|
public interface PermitedForHaj {
|
||||||
//public boolean has_UID();
|
//public boolean has_UID();
|
||||||
public int hasUID();
|
public int hasUID();
|
@ -1,3 +1,8 @@
|
|||||||
|
package ee364.hajj.group;
|
||||||
|
|
||||||
|
import ee364.hajj.Gender;
|
||||||
|
import ee364.hajj.Priority;
|
||||||
|
|
||||||
public class Pilgrim {
|
public class Pilgrim {
|
||||||
|
|
||||||
//keep track of all pilgrim object count.
|
//keep track of all pilgrim object count.
|
@ -1,3 +1,5 @@
|
|||||||
|
package ee364.hajj.transport;
|
||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
public class Accident {
|
public class Accident {
|
||||||
@ -15,7 +17,7 @@ public class Accident {
|
|||||||
Date startOfSimDate = new Date(15000000);
|
Date startOfSimDate = new Date(15000000);
|
||||||
//TODO: make a static final class with needed values
|
//TODO: make a static final class with needed values
|
||||||
if (date.before(startOfSimDate)){
|
if (date.before(startOfSimDate)){
|
||||||
throw new IllegalArgumentException("Date of Accident before t zero");
|
throw new IllegalArgumentException("Date of ee364.hajj.transport.Accident before t zero");
|
||||||
}
|
}
|
||||||
else this.date = date;
|
else this.date = date;
|
||||||
}
|
}
|
@ -1,3 +1,5 @@
|
|||||||
|
package ee364.hajj.transport;
|
||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
public interface Breakable {
|
public interface Breakable {
|
5
src/ee364/hajj/transport/CanFixAccident.java
Normal file
5
src/ee364/hajj/transport/CanFixAccident.java
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
package ee364.hajj.transport;
|
||||||
|
|
||||||
|
public interface CanFixAccident {
|
||||||
|
//void attendToAccident(ee364.hajj.transport.Accident accident);
|
||||||
|
}
|
@ -1,3 +1,5 @@
|
|||||||
|
package ee364.hajj.transport;
|
||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
public class Sedan extends Vehicle implements Breakable {
|
public class Sedan extends Vehicle implements Breakable {
|
@ -1,3 +1,5 @@
|
|||||||
|
package ee364.hajj.transport;
|
||||||
|
|
||||||
public class TrafficPoliceCar extends Vehicle implements CanFixAccident {
|
public class TrafficPoliceCar extends Vehicle implements CanFixAccident {
|
||||||
|
|
||||||
public final double ADDED_EFFICIENCY = 0.05; // 5%
|
public final double ADDED_EFFICIENCY = 0.05; // 5%
|
@ -1,3 +1,5 @@
|
|||||||
|
package ee364.hajj.transport;
|
||||||
|
|
||||||
public abstract class Vehicle {
|
public abstract class Vehicle {
|
||||||
|
|
||||||
private double vehicleSize;
|
private double vehicleSize;
|
Loading…
Reference in New Issue
Block a user