Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribed
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 menu

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

Mobile Communications

Authors: Jochen Schiller

2nd edition

978-0321123817, 321123816, 978-8131724262

More Books

Students also viewed these Programming questions