private static BookClass[] InitializeBookLibary() { BookClass[] list = new BookClass[4]; for (int i = 0; i < list.Length; i++) { list[i] = new BookClass(); } return(list); }
static void Main(string[] args) { BookClass[] books = InitializeBookLibary(); string isbnInput = ""; OptionMenu.DisplayMenuOnConsole(); int option = 0; do { Console.WriteLine("Enter Menu Option"); option = Convert.ToInt32(Console.ReadLine()); switch (option) { case OptionMenu.PrintMenu: OptionMenu.DisplayMenuOnConsole(); break; case OptionMenu.PrintBookList: PrintBookList(books); break; case OptionMenu.InsertBook: InsertBooks(books); break; case OptionMenu.FindBook: findbook(books, isbnInput); break; case OptionMenu.UpdateBook: BookClass book = findbook(books, isbnInput); updatebook(book); //book.Update(); break; case OptionMenu.Exit: Console.WriteLine("Goodbye"); break; } } while (option != OptionMenu.Exit); }
private static void updatebook(BookClass book) { book.getUserInput(); }