Use packages/folders for grouped classes

This commit is contained in:
HeshamTB 2020-10-16 07:27:40 +03:00
parent ab9e26f9ab
commit 97620bce11
Signed by: Hesham
GPG Key ID: 74876157D199B09E
12 changed files with 31 additions and 4 deletions

View File

@ -1,3 +0,0 @@
public interface CanFixAccident {
//void attendToAccident(Accident accident);
}

View File

@ -1,3 +1,5 @@
package ee364.hajj;
public enum Gender {
MALE,
FEMALE

View File

@ -1,3 +1,5 @@
package ee364.hajj;
public enum Priority {
HIGH,
MID,

View File

@ -1,3 +1,7 @@
package ee364.hajj.group;
import ee364.hajj.Priority;
public class Campaign implements PermitedForHaj {
private int UID;

View File

@ -1,3 +1,5 @@
package ee364.hajj.group;
public interface PermitedForHaj {
//public boolean has_UID();
public int hasUID();

View File

@ -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.

View File

@ -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;
}

View File

@ -1,3 +1,5 @@
package ee364.hajj.transport;
import java.util.Date;
public interface Breakable {

View File

@ -0,0 +1,5 @@
package ee364.hajj.transport;
public interface CanFixAccident {
//void attendToAccident(ee364.hajj.transport.Accident accident);
}

View File

@ -1,3 +1,5 @@
package ee364.hajj.transport;
import java.util.Date;
public class Sedan extends Vehicle implements Breakable {

View File

@ -1,3 +1,5 @@
package ee364.hajj.transport;
public class TrafficPoliceCar extends Vehicle implements CanFixAccident {
public final double ADDED_EFFICIENCY = 0.05; // 5%

View File

@ -1,3 +1,5 @@
package ee364.hajj.transport;
public abstract class Vehicle {
private double vehicleSize;