Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In C++ can you make a header code for this? im blanking Assignment: Managing Books Part 1 Instructions A local library needs a program that

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

In C++ can you make a header code for this? im blanking

Assignment: Managing Books 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 ISBN. 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 allow 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 by ISBN: Checked out by: Note: If the book is NOT checked out, do NOT output the "Checked out by" message. There is a partially completed definition of the main function, as well as functions for creating the book library (i.e., an array of 5 book objects) and the ISBN lookup function. You goal for this file is to finish the definition of the main function by writing the code for each of the menu commands listed above. Below is a breakdown of how to write each command: Search the library of books by ISBN call the ISBN lookup function. If the function returns -1, then output an error message, otherwise, output the book at the returned index. Checkout a book. Call the ISBN lookup function. If the function returns -1, then output an error message. Otherwise, check to see if the book is currently checked out. If it is, output an appropriate error message. If not, then ask the user for the name of the person checking out the book and call the appropriate method for checking out the book. Note: Before inputting the string (which will require getline), use the statement "cin.ignore()" above the getline statement to ensure that your program doesn't "skip the input for the name. Return a book, Call the ISBN lookup function. If the function returns -1, then output an error message. Otherwise, check to see if the book is currently checked out. If it is, call the appropriate method for checking out the book. If not, then output an appropriate error message

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

Step: 3

blur-text-image

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