Ejemplo n.º 1
0
        static void Main(string[] args)
        {
            Console.WriteLine("********************************************************");
            Console.WriteLine("**********WELCOME TO HOTEL RESERVATION PROGRAM**********");
            Console.WriteLine("********************************************************");
            /// Object of the HotelReservation class
            HotelReservation hotelReservation = new HotelReservation();

            /// Adding hotel's name and rate
            hotelReservation.AddHotel("Lakewood", 110);
            hotelReservation.AddHotel("Bridgewood", 160);
            hotelReservation.AddHotel("Ridgewood", 220);
            /// Cheapest hotel
            hotelReservation.CheapestHotel();
        }
Ejemplo n.º 2
0
        public static void Main(string[] args)
        {
            Console.WriteLine("Welcome to Hotel Reservation Program\n");
            HotelReservation hotelReservation = new HotelReservation();

            hotelReservation.AddHotels();
            Console.WriteLine("Enter the check-in date informat dd/mm/yyyy");
            string   checkIn     = Console.ReadLine();
            DateTime checkInDate = DateTime.ParseExact(checkIn, "dd/mm/yyyy", CultureInfo.InvariantCulture);

            Console.WriteLine("Enter the check-out date informat dd/mm/yyyy");
            string   checkOut     = Console.ReadLine();
            DateTime checkOutDate = DateTime.ParseExact(checkOut, "dd/mm/yyyy", CultureInfo.InvariantCulture);

            hotelReservation.CheapestHotel(checkInDate, checkOutDate);
        }