derived implement call
This commit is contained in:
@@ -21,7 +21,10 @@ public final class CabinReservation extends Reservation {
|
||||
}
|
||||
|
||||
public CabinReservation(final Address physical_address) {
|
||||
this();
|
||||
super();
|
||||
this.setType('C');
|
||||
this.setNumberOfBeds(1);
|
||||
this.setKitchen(KitchenTypeEnum.Kitchenette);
|
||||
this.setPhysical_address(
|
||||
new Address(physical_address.getStreet(), physical_address.getCity(), physical_address.getState(),
|
||||
physical_address.getZip()));
|
||||
|
||||
@@ -30,7 +30,14 @@ public final class HotelReservation extends Reservation{
|
||||
}
|
||||
|
||||
public HotelReservation(final Address physical_address) {
|
||||
this();
|
||||
super();
|
||||
this.setType('H');
|
||||
this.setNumberOfBeds(2);
|
||||
this.setNumberOfBeds(2);
|
||||
this.setNumberOfBedRooms(1);
|
||||
this.setNumberOfBathRooms(1);
|
||||
this.setNumberOfFloors(1);
|
||||
this.setKitchen(KitchenTypeEnum.Kitchenette);
|
||||
this.setPhysical_address(
|
||||
new Address(physical_address.getStreet(), physical_address.getCity(), physical_address.getState(),
|
||||
physical_address.getZip()));
|
||||
|
||||
@@ -28,7 +28,13 @@ public final class HouseReservation extends Reservation {
|
||||
}
|
||||
|
||||
public HouseReservation(final Address physical_address) {
|
||||
this();
|
||||
super();
|
||||
this.setType('Z');
|
||||
this.setNumberOfBeds(2);
|
||||
this.setNumberOfBedRooms(1);
|
||||
this.setNumberOfBathRooms(1);
|
||||
this.setNumberOfFloors(1);
|
||||
this.setKitchen(KitchenTypeEnum.Kitchenette);
|
||||
this.setPhysical_address(
|
||||
new Address(physical_address.getStreet(), physical_address.getCity(), physical_address.getState(),
|
||||
physical_address.getZip()));
|
||||
|
||||
Reference in New Issue
Block a user