add interface
This commit is contained in:
9
src/java/lodge/reservationsystem/IReservation.java
Normal file
9
src/java/lodge/reservationsystem/IReservation.java
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
package lodge.reservationsystem;
|
||||||
|
|
||||||
|
public interface IReservation {
|
||||||
|
|
||||||
|
public String ReservationType();
|
||||||
|
public boolean checkValid() throws ReservationException;
|
||||||
|
public float calculatePrice();
|
||||||
|
|
||||||
|
}
|
||||||
@@ -8,7 +8,7 @@ import java.nio.file.Path;
|
|||||||
import java.nio.file.Paths;
|
import java.nio.file.Paths;
|
||||||
import java.time.ZonedDateTime;
|
import java.time.ZonedDateTime;
|
||||||
|
|
||||||
public abstract class Reservation {
|
public abstract class Reservation implements IReservation{
|
||||||
private char type;
|
private char type;
|
||||||
private String reservation_number = "-99";
|
private String reservation_number = "-99";
|
||||||
private Address physical_address;
|
private Address physical_address;
|
||||||
@@ -240,13 +240,8 @@ public abstract class Reservation {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public abstract String ReservationType();
|
|
||||||
|
|
||||||
public abstract float calculatePrice();
|
|
||||||
|
|
||||||
public abstract boolean checkValid() throws ReservationException;
|
|
||||||
|
|
||||||
public void update(Reservation rsrv) {
|
public void update(Reservation rsrv) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user