- Download the latest version of startingpoint.py.
1. Implement the methods for add_book and remove_book.
- Notice the arguments that each function expects.
- Think about how self.books should look. It's a dictionary, so if Book objects are values, what are the keys? This will affect how you design these functions.
- Notice that
savemethod is already written and we are storing the library in a pickle.
2. Now, try to write methods for find_book and get_all_books.
- Again, you want to look at what arguments they are expecting and also at what they want to return.
3. Download menu.py, examine the Menu class, a subclass of cmd and see how it separates the user interface (asking the user about books) from the data access (the code that stores the books). This separation will become more important if we make a web interface, GUI, etc.