Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
Well done!
You have completed Practice Object Interaction!
You have completed Practice Object Interaction!
For our next step, let's discuss how to we could go about expanding our app so charges can be fined to patrons with overdue books.
Instructions for Workspace
Your instructions are as follows:
1) Add a property called dailyFine
, initialized to .1
, to the Library class constructor method.
2) Add a property called balance
, initialized to 0
, to the Patron class constructor method.
3) Add a method called chargeFines()
to the Library class that finds all Patrons with overdue books and charges them the daily fine for every day their book is late.
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign upRelated Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up