Question: 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
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
