Question: In C++ what is the correct implentation for the checkedoutby, returnBook, and outputBook function. The UML diagram is below. Descriptions of Notable Methods 1.checkOutBookThis method

In C++ what is the correct implentation for the checkedoutby, returnBook, and outputBook function. The UML diagram is below.

Descriptions of Notable Methods

1.checkOutBookThis method changes the status of the book to true and sets the checkedOutBy attribute to the name of the person that has checked out the book. This method should NOTupdate 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.returnBookThis method sets the status attribute to false and checkedOutBy attribute to the empty string (i.e., empty set of quotes). This method should return nothing.

3.outputBookThis method outputs the books information in the following format:

by <author>ISBN: <isbn number>Checked out by: <whoever has it checked out> <p><img style="height:526px;width:532px;" src="https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66f5ab1554b4b_14866f5ab14ea4b4.jpg" alt="In C++ what is the correct implentation for the checkedoutby, returnBook, and"></p> Book -title:string -author:string -ISBN:int -status:bool -checkedOutBy:string <constructor> 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</constructor></whoever></isbn></author>

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!