Exemplo n.º 1
0
        void Start()
        {
            BookStore store     = new BookStore();
            Book      book1     = new Book("Dracula", 15.00f, 5, "Bram Stoker");
            Book      book2     = new Book("Joe Speedboot", 12.50f, 3, "Tommy Wieringa");
            Magazine  magazine  = new Magazine("Time", 3.90f, 10, DayOfWeek.Friday);
            Magazine  magazine2 = new Magazine("Donald Duck", 2.50f, 15, DayOfWeek.Thursday);
            CD        cd        = new CD("Seventeen Seconds", 3.90f, 5, "The Cure");

            store.Add(book1);
            store.Add(book2);
            store.Add(magazine);
            store.Add(magazine2);
            store.Add(cd);
            store.PrintAllItems();
        }
Exemplo n.º 2
0
        void Start()
        {
            BookStore Broese    = new BookStore();
            Book      book1     = new Book("Dracula", "Bram Stoker", 15.00, 5);
            Book      book2     = new Book("Joe SpeedBoot", "Tommy Wieringa", 12.50, 5);
            Magazine  magazine1 = new Magazine("Time", "Friday", 3.90, 10);
            Magazine  magazine2 = new Magazine("Donald Duck", "Thursday", 2.50, 8);
            Book      book3     = new Book("The Hobbit", "J.R.R Tolkien", 12.50, 4);

            Broese.Add(book1);
            Broese.Add(book2);
            Broese.Add(book3);
            Broese.Add(magazine1);
            Broese.Add(magazine2);

            Broese.PrintEveryBook();
            Console.WriteLine();
            Broese.PrintCompleteStock();
            Console.ReadKey();
        }