Question: Question 2 18 pts Using the class template below make a complete class definition for a class that describes a simplified inventory record for a

 Question 2 18 pts Using the class template below make a

complete class definition for a class that describes a simplified inventory record

for a bookstore. [hint: copy and paste the code template provided to

Question 2 18 pts Using the class template below make a complete class definition for a class that describes a simplified inventory record for a bookstore. [hint: copy and paste the code template provided to save time, them modify it] . For each function you must fill in the function header with appropriate return type and parameters. . For each variable, you must select an appropriate name and type. Make sure your code conforms to the instructions given in the comments for each function. class BookInventory { public: // Constructor that uses two parameters. The first ISBN and the second the n ame of the book. // The quantity in the inventory should be set to zero. getBooksInStock. . // Accessor function that returns the current quantity of books in stock. addNewBook ). // Function that takes a number of units received from a publisher // as a parameter and adds this value to the quantity in inventory setStock . // Function that takes a book inventory value as a parameter and // sets the quantity in inventory to that value salec ). // Function that takes a number of units sold as a parameter and // updates the quantity in inventory for this book. Inventory can't be negati ve. private: string ISBN; // variable holds 20 char for a book identification ; // variable holds the book name // variable holds number of units in stock }; //Function declaration (Implementation): { // Constructor that uses two parameters. The first ISBN and the second the n ame of the book. // The quantity in the inventory should be set to zero. } getBooksInStock ( { // Accessor function that returns the current quantity of books in stock. } addNewBook .).; { // Function that takes a number of units received from a publisher // as a parameter and adds this value to the quantity in inventory } setStock. ). { // Function that takes a book inventory value as a parameter and // sets the quantity in inventory to that value } sale (. ... { // Function that takes a number of units sold as a parameter and // updates the quantity in inventory for this book. Inventory can't be negati ve. {

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!