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:
library_item_id - 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 "ON_SHELF", "ON_HOLD_SHELF", or "CHECKED_OUT"
checked_out_by - refers to the Patron who has it checked out (if any)
requested_by - refers to the Patron who has requested it (if any); a LibraryItem can only be requested by one Patron at a time
date_checked_out - when a LibraryItem is checked out, this will be set to the current_date of the Library
The LibraryItem methods are:
init method - takes a library item ID and title as parameters; checked_out_by and requested_by should be initialized to None; a new LibraryItem's location should be on the shelf
get_location 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 blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!