Answered step by step
Verified Expert Solution
Question
1 Approved Answer
C++ A Bookstore maintains an inventory of books. Each Book has a title (string), author (string), isbn (string), cost (double) and number in stock (int).
C++
A Bookstore maintains an inventory of books. Each Book has a title (string), author (string), isbn (string), cost (double) and number in stock (int). Create the Book & Bookstore classes. Store all of the books in a vector in the Bookstore object. Make all data attributes private. Define all accessor & mutator functions. Your main function displays a menu: 1. New inventory: your program asks for isbn and number of copies of the new books. If the isbn is in stock, the number of new books is added to the existing number of books with the same isbn. If the ison is not in stock, the program asks for the title, author, and cost, and stores the information. Then the program re-displays the menu. 2. Book sold: your program asks for isbn number and updates the inventory amount in memory. If isbn not in stock, display an error message. (Only 1 copy of a book is sold at a time!) Then the program re-displays the menu. 3. Inventory list: your program lists each book (isbn, title, author, cost, number in stock). Then the program re-displays the menuStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started