Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

9. A simple software system for a library models a library as a collection of books and patrons. A patron can have at most three

9. A simple software system for a library models a library as a collection of books and patrons. A patron can have at most three books out on loan at any given time. A book also has a list of patrons waiting to borrow it. Each book has a title, an author, a patron to whom it has been checked out, and a list of patrons waiting for that book to be returned. Each patron has a name and the number of books it has currently checked out. Develop the classes Book and Patron to model these objects. Think first of the interface or set of methods used with each class, and then choose appropriate data structures for the state of the objects. Also, write a short script to test these classes

 10.Develop a Library class that can manage the books and patrons from Project 9. This class should include methods for adding, removing, and finding books and patrons. There should also be methods for borrowing and returning a book. Write a script to test all these methods.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

Heres an implementation of the Book and Patron classes in Python along with a script to test them class Book def initself title author selftitle title selfauthor author selfcheckedoutto None selfwaiti... 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

Systems Analysis and Design in a Changing World

Authors: John W. Satzinger, Robert B. Jackson, Stephen D. Burd

7th edition

1305117204, 176902031, 9780176902032, 9781305465268 , 978-1305117204

More Books

Students also viewed these Programming questions