update
This commit is contained in:
@@ -3,7 +3,7 @@ package lodge.reservationsystem;
|
|||||||
import java.time.ZonedDateTime;
|
import java.time.ZonedDateTime;
|
||||||
import java.time.temporal.ChronoUnit;
|
import java.time.temporal.ChronoUnit;
|
||||||
|
|
||||||
public final class CabinReservation extends Reservation{
|
public final class CabinReservation extends Reservation implements IReservation{
|
||||||
|
|
||||||
CabinReservation(){
|
CabinReservation(){
|
||||||
super();
|
super();
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ package lodge.reservationsystem;
|
|||||||
import java.time.ZonedDateTime;
|
import java.time.ZonedDateTime;
|
||||||
import java.time.temporal.ChronoUnit;
|
import java.time.temporal.ChronoUnit;
|
||||||
|
|
||||||
public final class HotelReservation extends Reservation {
|
public final class HotelReservation extends Reservation implements IReservation {
|
||||||
|
|
||||||
HotelReservation() {
|
HotelReservation() {
|
||||||
super();
|
super();
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ package lodge.reservationsystem;
|
|||||||
import java.time.ZonedDateTime;
|
import java.time.ZonedDateTime;
|
||||||
import java.time.temporal.ChronoUnit;
|
import java.time.temporal.ChronoUnit;
|
||||||
|
|
||||||
public final class HouseReservation extends Reservation {
|
public final class HouseReservation extends Reservation implements IReservation{
|
||||||
|
|
||||||
HouseReservation(){
|
HouseReservation(){
|
||||||
super();
|
super();
|
||||||
|
|||||||
@@ -1,9 +1,5 @@
|
|||||||
package lodge.reservationsystem;
|
package lodge.reservationsystem;
|
||||||
|
|
||||||
public interface IReservation {
|
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 implements IReservation{
|
public abstract class Reservation{
|
||||||
private char type;
|
private char type;
|
||||||
private String reservation_number = "-99";
|
private String reservation_number = "-99";
|
||||||
private Address physical_address;
|
private Address physical_address;
|
||||||
@@ -244,4 +244,9 @@ public abstract class Reservation implements IReservation{
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public abstract String ReservationType();
|
||||||
|
public abstract boolean checkValid() throws ReservationException;
|
||||||
|
public abstract float calculatePrice();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,26 +1 @@
|
|||||||
{
|
{ "Account":{"account_number": "A2074212339","phone_number": "301-356-3890","mailing_address": { "Address":{"street": "30 Amstadam ave","city": "New York","state": "NY","zip": "12010"}},"email_address": { "EmailAddress":{"email": "newbee952@aol.com"}},"reservation_list":[{"CabinReservation":{"reservation_number":"R2042828431"}}]}}
|
||||||
"Account": {
|
|
||||||
"account_number": "A2074212339",
|
|
||||||
"phone_number": "301-356-3890",
|
|
||||||
"mailing_address": {
|
|
||||||
"Address": {
|
|
||||||
"street": "30 Amstadam ave",
|
|
||||||
"city": "New York",
|
|
||||||
"state": "NY",
|
|
||||||
"zip": "12010"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"email_address": {
|
|
||||||
"EmailAddress": {
|
|
||||||
"email": "newbee952@aol.com"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"reservation_list": [
|
|
||||||
{
|
|
||||||
"CabinReservation": {
|
|
||||||
"reservation_number": "R2042828431"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,32 +1 @@
|
|||||||
{
|
{ "CabinReservation":{"reservation_type": "CabinReservation","reservation_number": "R0535276622","reservation_status": "Draft","reservation_start_date": "2025-09-05T10:00Z[UTC]","reservation_end_date": "2025-11-30T22:00Z[UTC]","physical_address": { "Address":{"street": "40 cabin ave","city": "Carnelian","state": "CA","zip": "96140"}},"mailing_address": { "Address":{"street": "40 cabin ave","city": "Carnelian Bay","state": "CA","zip": "96140"}},"kitchen": "Kitchenette","numberOfBeds": "4","numberOfBedRooms": "3","numberOfBathRooms": "1","numberOfFloors": "2","squareFeet": "806","price": "120.0"}}
|
||||||
"CabinReservation": {
|
|
||||||
"reservation_type": "CabinReservation",
|
|
||||||
"reservation_number": "R0535276622",
|
|
||||||
"reservation_status": "Draft",
|
|
||||||
"reservation_start_date": "2025-09-05T10:00Z[UTC]",
|
|
||||||
"reservation_end_date": "2025-11-30T22:00Z[UTC]",
|
|
||||||
"physical_address": {
|
|
||||||
"Address": {
|
|
||||||
"street": "40 cabin ave",
|
|
||||||
"city": "Carnelian",
|
|
||||||
"state": "CA",
|
|
||||||
"zip": "96140"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"mailing_address": {
|
|
||||||
"Address": {
|
|
||||||
"street": "40 cabin ave",
|
|
||||||
"city": "Carnelian Bay",
|
|
||||||
"state": "CA",
|
|
||||||
"zip": "96140"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"kitchen": "Kitchenette",
|
|
||||||
"numberOfBeds": "4",
|
|
||||||
"numberOfBedRooms": "3",
|
|
||||||
"numberOfBathRooms": "1",
|
|
||||||
"numberOfFloors": "2",
|
|
||||||
"squareFeet": "806",
|
|
||||||
"price": "120.0"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user