Question: # PROBLEM 7: Let's add mechanisms for checking books out of and into libraries. # Add the following method to the Library class: # -

 # PROBLEM 7: Let's add mechanisms for checking books out of

# PROBLEM 7: Let's add mechanisms for checking books out of and into libraries. # Add the following method to the Library class: # - willAccept (accepts a Book instance as an argument ): Use isinstance to check if the book argument is a PaperBook instance. If it is, return True (you can check this using isinstance) if (and only if ) book. numTornPages is less than self . tornPageTolerance # If the book is NOT a PaperBook instance, return True

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!