Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

python 3. Write definitions of two new abstract data types (ADTs): Patron and Librar Assume that we want to create a simple library: a library

python image text in transcribed
image text in transcribed
3. Write definitions of two new abstract data types (ADTs): Patron and Librar Assume that we want to create a simple library: a library has a list of dif- ferent book titles (assume that we ignore the information about the author, different publishers, publish year, and other information; we are interested only in a title of the book), a list of patrons, library name and library id. Each patron has a name, id, and the list of books on loan (these will also be book titles). Feel free to add more attributes as you see fit. Each Patron instance should be able to: (a) return the patron's name and id (b) return the alphabetized list of book titles the patron borrowed and did not return yet (c) return the number of books on loan, (d) add a book title to the list of books on loan, 3. Write definitions of two new abstract data types (ADTs): Patron and Librar Assume that we want to create a simple library: a library has a list of dif- ferent book titles (assume that we ignore the information about the author, different publishers, publish year, and other information; we are interested only in a title of the book), a list of patrons, library name and library id. Each patron has a name, id, and the list of books on loan (these will also be book titles). Feel free to add more attributes as you see fit. Each Patron instance should be able to: (a) return the patron's name and id (b) return the alphabetized list of book titles the patron borrowed and did not return yet (c) return the number of books on loan, (d) add a book title to the list of books on loan

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

Database Driven Web Sites

Authors: Joline Morrison, Mike Morrison

2nd Edition

? 061906448X, 978-0619064488

More Books

Students also viewed these Databases questions