Bummer! This is just a preview. You need to be signed in with an account to view the entire instruction.
- Explanation: Adding Methods to the Library Class 1:20
- Solution: Adding Methods to the Library Class
- Demo: Add Patrons and Books to the Library Class 1:58
- Explanation: Checking Out and Returning Books 1:24
- Recap: Updating our Plan of Attack
- Solution: Adding New Properties to the Book Class
- Starting with Some Methods 4 questions
Instruction
Solution: Adding Methods to the Library Class
The addBook() Method
The addBook() method is a method we need to add to the Library class. Adding it to the Library class means that it will be available on any Library objects that are created.
The addBook() method is our way of entering a new book into the library’s system. It should receive one argument - the actual Book object that’s being added.
When the method is called on the Librar...