Answered step by step
Verified Expert Solution
Link Copied!

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:
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

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_2

Step: 3

blur-text-image_3

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

More Books

Students also viewed these Databases questions

Question

Write an elaborate note on marketing environment.

Answered: 1 week ago

Question

Define and measure service productivity.

Answered: 1 week ago