예제 #1
0
        static void Main()
        {
            HotelManager newHotel = new HotelManager();
            var          hotel1   = newHotel.CreateHotel();

            hotel1.Print();

            Console.WriteLine("\n");

            int i = 1;

            while (i <= 2)
            {
                Console.WriteLine("\n");
                newHotel.AddRoomToHotel(hotel1.Name);
                i++;
            }

            hotel1.Print();

            Console.WriteLine("\n");
            newHotel.UpdPriceOfRooms(hotel1.Name);

            hotel1.Print();

            Console.WriteLine("\n");
            newHotel.DeleteRoomFromHotel(hotel1.Name);

            hotel1.Print();
            //newHotel.PrintHotels();

            Console.ReadLine();
        }
예제 #2
0
        static void Main(string[] args)
        {
            HotelManager A = new HotelManager();

            A.CreateHotel();
            A.CreateHotel();

            A.Hotels[0].AddRoom("C1");
            A.Hotels[0].AddRoom("C2");
            A.Hotels[1].AddRoom("C3");
            A.Hotels[1].AddRoom("C4");

            A.Hotels[0].RemoveRoom("C1");
            A.Hotels[1].RemoveRoom("C3");

            A.Hotels[1].UpdatePrice(1000);
            Console.WriteLine("After updating price: ");

            A.Print();

            Console.ReadKey();
        }