Bummer! This is just a preview. You need to be signed in with an account to view the entire instruction.
Well done!
You have completed Practice Object Interaction!
You have completed Practice Object Interaction!
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...