Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Part 1 Instructions A local library needs a program that stores information about their books. The information that they need stored is as followed: The

image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
Part 1 Instructions A local library needs a program that stores information about their books. The information that they need stored is as followed: The title of the book. The book's author. The ISBN number (note: for this program, we will just use a random 5-digit number). The status of the book (i.e., whether it is checked out). The name of the person that has it currently checked the book out. The program should, in addition, support the following commands: 1. Search the library of books by ISN. 2. Checkout a book 3. Return a book. 4. Quit Program To implement this program, we are going to create a class called Book, which will Nlow us to create objects that store the required information for a given book. Below is a UML diagram that describes what members the Book class should have: Book title:string author:string ISBN:int -status:bool -checkedOutBy:string Book(p_title:string, p_author:string, p_ISBN:string) Getters and Setters +getTitle():string +getAuthor():string +getISBN():string +getStatus():bool +setTitle(new_title:string):none +setAuthor(new_author:string): none +setISBN(new_ISBN:int): none Utility Methods +checkOutBook(name:string): bool +returnBook():void +outputBook():void Descriptions of Notable Methods 1. checkOutBook - This method changes the status of the book to "true" and sets the *checkedOutByattribute to the name of the person that has checked out the book. This method should NOT update the status/checkedOutBy attributes if the book is already checked out. The method returns true if the book was successfully checked out and false if the book is already checked out. 2. returnBook - This method sets the status attribute to "false" and checked Out By attribute to the empty string (ie, empty set of quotes). This method should return nothing. 3. outputBook - This method outputs the books information in the following format: by Couthor ISBN: <isbn number checked out by: has it note: if the book is not do output by message. main file proga_testbookclass.op there a partially completed definition of function as well functions for creating library fie an array objects and isbn lookup function. you goal this to finish writing code each menu commands tested above below breakulown how write command search books call returns then error message atherwise at returned index checkout otherwise check see currently out. appropriate ask user name person checking method book. before inputting string will require gettine use statement in ignore getline ensure that your program doesn skip input return ifitis quit simply exit hints start first implement methods working on cop test individually create dummy object work with entenformation random booc caithe doll first. the.cpp file. menu. enter information observe they behave once feel confident works begin code. may either iffelse or switch decide what item chosen. one randomly. juststyle=""></isbn>

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

Prove that (ab + cd)2 Answered: 1 week ago

Answered: 1 week ago

Question

=+you think is being taxed when more money is printed? Why?

Answered: 1 week ago