Ejemplo n.º 1
0
        public double BuildTrip(string fromCity, string toCity, int days, HotelType hotelType, TripType tripType, GuideType guideType)
        {
            double price = 0;

            var hotelBooking = new HotelBooking();

            price += hotelBooking.BookHotel(hotelType, days);

            var tripBooking = new TripBooking();

            price += tripBooking.BookTrip(tripType, fromCity, toCity);

            var guideBooking = new GuideBooking();

            price += guideBooking.BookGuide(guideType, days);

            //Console.WriteLine("Tour info:");
            //Console.WriteLine($"From: {fromCity}");
            //Console.WriteLine($"To: {toCity}");
            //Console.WriteLine($"Hotel type: {hotelType}");
            //Console.WriteLine($"Trip type: {tripType}");
            //Console.WriteLine($"Guide type: {guideType}");
            //Console.WriteLine($"Total price: {price}");

            return(price);
        }
Ejemplo n.º 2
0
        public void Book()
        {
            FlightBooking flight = new FlightBooking();

            flight.Book();

            HotelBooking hotel = new HotelBooking();

            hotel.Book();

            Console.WriteLine("Travel package booked successfully.");
        }