Beispiel #1
0
        static void Main(string[] args)
        {
            var book1 = new Book("Book 1", 5);

            book1.Display();

            var book2      = new Book("Book 2", 7);
            var borrowBook = new Borrowable(book2);

            borrowBook.Borrow("User 1");
            borrowBook.Borrow("User 2");
            borrowBook.Display();

            Console.ReadKey();
        }
Beispiel #2
0
        static void Main(string[] args)
        {
            Console.WriteLine("Sans decorator!");

            Book book = new Book("J. K. Rowling", "Harry Potter IV", 10);

            book.Display();

            Video video = new Video("Peter Jackson", "Seigneur des anneaux II", 20, 135);

            video.Display();

            Borrowable borrowable = new Borrowable(video);

            borrowable.Borrow("Elias");

            borrowable.Display();
        }