static void Main(string[] args) { Library library = new Library(); Reader reader = new Reader(); reader.SeeBooks(library); Console.Read(); }
public void SeeBooks(Library library) { IBookIterator iterator = library.CreateNumerator(); while (iterator.HasNext()) { Book book = iterator.Next(); Console.WriteLine(book.Name); } }