//private method to call FindBestHotel Method private static void GetBestHotel() { DateTime[] dates = AskStartAndEndDate(); CustomerType custType = AskCustomerType(); HotelReservation hotelReservationObj = new HotelReservation(custType, dates[0], dates[1]); string bestHotel = hotelReservationObj.FindBestHotel(); int cheapestRate = hotelReservationObj.FindCheapestTotalRate(); ColouredPrint.PrintInRed($"Best Hotel is {bestHotel} with Total rate {cheapestRate} and Rating {hotelReservationObj.FindBestHotelRating()}"); }
//Private method to call FindCheapestHotels method private static void GetCheapestHotels() { DateTime[] dates = AskStartAndEndDate(); CustomerType custType = AskCustomerType(); HotelReservation hotelReservationObj = new HotelReservation(custType, dates[0], dates[1]); List <string> cheapestHotels = hotelReservationObj.FindCheapestHotels(); int cheapestRate = hotelReservationObj.FindCheapestTotalRate(); ColouredPrint.PrintInRed("Cheapest hotels is/are : ", false, false); foreach (string hotel in cheapestHotels) { ColouredPrint.PrintInRed($"{hotel}"); } ColouredPrint.PrintInRed($"Cheapest Rate is {cheapestRate}"); }