Beispiel #1
0
        //created an object mybook to access Book class method and properties
        static void Main(string[] args)
        {
            Book myBook = new Book();

            myBook.Title  = "On Earth We're Briefly Gorgeous";
            myBook.Author = "Ocean Vuong";
            myBook.Year   = 2019;
            myBook.Display();
        }
Beispiel #2
0
        static void Main(string[] args)
        {
            Book newBook = new Book("Meet me in the middle", "Kevin Mizway", 1985);

            newBook.Display();
        }
Beispiel #3
0
        static void Main()
        {
            Book book = new Book("Worley", "Inside ASP.NET", 10);
              book.Display();

              Video video = new Video("Spielberg", "Jaws", 23, 92);
              video.Display();

              Console.WriteLine("\nMaking video borrowable:");

              Borrowable borrowvideo = new Borrowable(video);
              borrowvideo.BorrowItem("Customer #1");
              borrowvideo.BorrowItem("Customer #2");

              borrowvideo.Display();

              Console.ReadKey();
        }