update
This commit is contained in:
@@ -10,13 +10,15 @@ import java.nio.charset.StandardCharsets;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.nio.file.Paths;
|
||||
|
||||
import java.util.ListIterator;
|
||||
|
||||
import lodge.reservation.IReservation;
|
||||
import lodge.reservation.Reservation;
|
||||
import lodge.reservationsystem.DataRepository;
|
||||
import lodge.reservation.IReservation;
|
||||
|
||||
/**
|
||||
* Concrete account data class for account json storage record.
|
||||
* Collects account attributes, and hash instance to enforce uniqueness.
|
||||
*/
|
||||
public class Account {
|
||||
private String account_number = "-99";
|
||||
private String phone_number;
|
||||
|
||||
@@ -13,8 +13,8 @@ import lodge.data.Account;
|
||||
import lodge.data.AccountList;
|
||||
import lodge.data.Address;
|
||||
import lodge.data.EmailAddress;
|
||||
import lodge.reservation.Reservation;
|
||||
import lodge.reservation.IReservation;
|
||||
import lodge.reservation.Reservation;
|
||||
|
||||
public final class AccomodationManager {
|
||||
|
||||
@@ -42,7 +42,7 @@ public final class AccomodationManager {
|
||||
}
|
||||
|
||||
// Load / Deserialize Account
|
||||
public void load(Path file) throws Exception {
|
||||
protected void load(Path file) throws Exception {
|
||||
|
||||
Account account = DataRepository.LoadAccount(file);
|
||||
if (account == null) {
|
||||
|
||||
@@ -11,6 +11,9 @@ import lodge.data.Address;
|
||||
import lodge.data.KitchenTypeEnum;
|
||||
import lodge.reservation.Reservation;
|
||||
|
||||
/**
|
||||
* Concrete reservation data class for reservation storage record
|
||||
*/
|
||||
public final class CabinReservation extends Reservation {
|
||||
|
||||
public CabinReservation() {
|
||||
@@ -19,7 +22,7 @@ public final class CabinReservation extends Reservation {
|
||||
this.setNumberOfBeds(1);
|
||||
this.setKitchen(KitchenTypeEnum.Kitchenette);
|
||||
}
|
||||
|
||||
|
||||
public CabinReservation(final Address physical_address) {
|
||||
super();
|
||||
this.setType('C');
|
||||
|
||||
@@ -12,7 +12,10 @@ import lodge.data.Address;
|
||||
import lodge.data.KitchenTypeEnum;
|
||||
import lodge.reservation.Reservation;
|
||||
|
||||
public final class HotelReservation extends Reservation{
|
||||
/**
|
||||
* Concrete reservation data class for reservation storage record
|
||||
*/
|
||||
public final class HotelReservation extends Reservation {
|
||||
|
||||
public HotelReservation() {
|
||||
super();
|
||||
@@ -24,9 +27,9 @@ public final class HotelReservation extends Reservation{
|
||||
this.setNumberOfFloors(1);
|
||||
this.setKitchen(KitchenTypeEnum.Kitchenette);
|
||||
}
|
||||
|
||||
|
||||
public static Reservation copy(String reservationType) {
|
||||
return new HotelReservation();
|
||||
return new HotelReservation();
|
||||
}
|
||||
|
||||
public HotelReservation(final Address physical_address) {
|
||||
|
||||
@@ -11,6 +11,9 @@ import lodge.data.Address;
|
||||
import lodge.data.KitchenTypeEnum;
|
||||
import lodge.reservation.Reservation;
|
||||
|
||||
/**
|
||||
* Concrete reservation data class for reservation storage record
|
||||
*/
|
||||
public final class HouseReservation extends Reservation {
|
||||
|
||||
public HouseReservation() {
|
||||
@@ -24,7 +27,7 @@ public final class HouseReservation extends Reservation {
|
||||
}
|
||||
|
||||
public static Reservation copy(String reservationType) {
|
||||
return new HouseReservation();
|
||||
return new HouseReservation();
|
||||
}
|
||||
|
||||
public HouseReservation(final Address physical_address) {
|
||||
|
||||
Reference in New Issue
Block a user