static void Main(string[] args) { Book book1 = new Book(); book1.Title = "Wilbur's Wonderful Life"; Shelf.Add(book1); foreach (var book in Shelf.arrayOfBooks) { Console.WriteLine(book.Title); } Console.Write("Please enter a book title: "); string input = Console.ReadLine(); Book book2 = new Book(); book2.Title = input; Shelf.Add(book2); foreach (var book in Shelf.arrayOfBooks) { Console.WriteLine(book.Title); } Console.Read(); }
public void AddShelf(string name) { Shelf shelf = new Shelf(name); shelves.Add(shelf); }
public void AssignShelf(Shelf shelf) { _shelf = shelf; _shelf.AssignBook(this); }