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 {
|
||||
MALE,
|
||||
FEMALE
|
@ -1,3 +1,5 @@
|
||||
package ee364.hajj;
|
||||
|
||||
public enum Priority {
|
||||
HIGH,
|
||||
MID,
|
@ -1,3 +1,7 @@
|
||||
package ee364.hajj.group;
|
||||
|
||||
import ee364.hajj.Priority;
|
||||
|
||||
public class Campaign implements PermitedForHaj {
|
||||
|
||||
private int UID;
|
@ -1,3 +1,5 @@
|
||||
package ee364.hajj.group;
|
||||
|
||||
public interface PermitedForHaj {
|
||||
//public boolean has_UID();
|
||||
public int hasUID();
|
@ -1,3 +1,8 @@
|
||||
package ee364.hajj.group;
|
||||
|
||||
import ee364.hajj.Gender;
|
||||
import ee364.hajj.Priority;
|
||||
|
||||
public class Pilgrim {
|
||||
|
||||
//keep track of all pilgrim object count.
|
@ -1,3 +1,5 @@
|
||||
package ee364.hajj.transport;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
public class Accident {
|
||||
@ -15,7 +17,7 @@ public class Accident {
|
||||
Date startOfSimDate = new Date(15000000);
|
||||
//TODO: make a static final class with needed values
|
||||
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;
|
||||
}
|
@ -1,3 +1,5 @@
|
||||
package ee364.hajj.transport;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
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;
|
||||
|
||||
public class Sedan extends Vehicle implements Breakable {
|
@ -1,3 +1,5 @@
|
||||
package ee364.hajj.transport;
|
||||
|
||||
public class TrafficPoliceCar extends Vehicle implements CanFixAccident {
|
||||
|
||||
public final double ADDED_EFFICIENCY = 0.05; // 5%
|
@ -1,3 +1,5 @@
|
||||
package ee364.hajj.transport;
|
||||
|
||||
public abstract class Vehicle {
|
||||
|
||||
private double vehicleSize;
|
Loading…
Reference in New Issue
Block a user