Answered step by step
Verified Expert Solution
Question
1 Approved Answer
A LibraryItem object represents a library item that a patron can check out from a library. It has six data members: library _ item _
A LibraryItem object represents a library item that a patron can check out from a library. It has six data members:
libraryitemid a unique identifier for a LibraryItem you can assume uniqueness, you don't have to enforce it
title cannot be assumed to be unique
location a LibraryItem can be ONSHELF", ONHOLDSHELF", or "CHECKEDOUT"
checkedoutby refers to the Patron who has it checked out if any
requestedby refers to the Patron who has requested it if any; a LibraryItem can only be requested by one Patron at a time
datecheckedout when a LibraryItem is checked out, this will be set to the currentdate of the Library
The LibraryItem methods are:
init method takes a library item ID and title as parameters; checkedoutby and requestedby should be initialized to None; a new LibraryItem's location should be on the shelf
getlocation returns the Library Item's location
other get and set methods as needed
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started