Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

IN PYTHON: Create a class named Library. Every instance of Library should have two instance variables: books (set it to an empty list initially) tornPageTolerance

IN PYTHON:

Create a class named Library. Every instance of Library should have two instance variables: books (set it to an empty list initially) tornPageTolerance (set it to 10 initially) The constructor for Library SHOULD NOT take any arguments (besides self).

Define the following methods in your Library class above:

addBook (should accept an instance of Book):

Add the provided Book to self.books; does not return anything

findBooksBy (should accept a string representing an author):

Return a list of every item in self.books where the author argument equals the book's author. These books should be in the same order in which they were added.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Transactions On Large Scale Data And Knowledge Centered Systems Vi Special Issue On Database And Expert Systems Applications Lncs 7600

Authors: Abdelkader Hameurlain ,Josef Kung ,Roland Wagner ,Stephen W. Liddle ,Klaus-Dieter Schewe ,Xiaofang Zhou

2012th Edition

3642341780, 978-3642341786

Students also viewed these Databases questions

Question

My opinions/suggestions are valued.

Answered: 1 week ago