Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
TourAndTravelFacade class for facade design pattern
package facade
import subsystems.{ShuttleBooking, GuideBooking, HotelBooking, TicketBooking}
class TourAndTravelFacade
val ticketBooking = new TicketBooking
val hotelBooking = new HotelBooking
val cabBooking = new ShuttleBooking
val guideBooking = new GuideBooking
def bookHolidayPackage(tourPackage : String, destination : String, departure : String) : Boolean =
ticketBooking.bookFlight(tourPackage, destination, departure)
hotelBooking.bookHotel(tourPackage, destination)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment