static void Main(string[] args) { Console.OutputEncoding = Encoding.UTF8; Bookstore bookstore = new Bookstore(); Book book1 = new Book("The answer to everything...", 42.00M); Magazine mag1 = new Magazine("WD40 weekly tips!", 8.95M, new DateTime(2012, 10, 7)); CD cd1 = new CD("Sounds of the universe", 9.99M); bookstore.AddToStock(book1, 24); bookstore.AddToStock(mag1, 10); bookstore.AddToStock(cd1); bookstore.PrintStock(); Console.ReadKey(); }
bool Start() { BookStore bookStore = new BookStore(); Book book1 = new Book("Dracula", 15, 5, "Bram Stoker"); Book book2 = new Book("Joe Speedboot", 12.5f, 3, "Tommy Wieringa"); Magazine magazine1 = new Magazine("Time", 3.9f, 10, DayOfWeek.Friday); Magazine magazine2 = new Magazine("Donald Duck", 2.5f, 15, DayOfWeek.Thursday); CD cd1 = new CD("Seventeen Seconds", 3.9f, 5, "The Cure"); bookStore.Add(book1); bookStore.Add(book2); bookStore.Add(magazine1); bookStore.Add(magazine2); bookStore.Add(cd1); bookStore.PrintAllItems(); return(LoopTools.LoopProgram()); }