Closed aCiotola closed 7 years ago
In order to further decouple the system from the concrete implementations that are specific to the Dawson Hotel, we will update our abstract factory.
Edit your dw317.hotel.businss.interfaces.HotelFactory and add the following method
//ADDED IN PHASE IV AllocationPolicy getAllocationPolicy(ReservationDAO reservations);
Note that adding methods to interfaces will break your old DawsonHotelFactory class. Add to the DawsonHotelFactory:
@Override public AllocationPolicy getAllocationPolicy(ReservationDAO reservations){ return new DawsonHotelAllocationPolicy(reservations); }
Added code
In order to further decouple the system from the concrete implementations that are specific to the Dawson Hotel, we will update our abstract factory.
Edit your dw317.hotel.businss.interfaces.HotelFactory and add the following method
Note that adding methods to interfaces will break your old DawsonHotelFactory class. Add to the DawsonHotelFactory: