Example #1
0
        static void Main(string[] args)
        {
            IVisit visit = new HtmlVisitor();

            Room hotel  = new HotelRoom(300, 1, "hotel");
            Room hostel = new HostelRoom(120, 4, "hostel");

            Console.WriteLine(hostel.Updateformat(visit));
            Console.WriteLine(hotel.Updateformat(visit));

            Console.ReadKey();
        }
Example #2
0
        public string Visit(HotelRoom room)
        {
            string str = string.Format("<p>Price: {0}, Capacity: {1}, Type: {2}</p>", room.Price, room.Capacity, room.Type);

            return(str);
        }