Write a c++ class definition for an abstract data type describing a bookstore inventory. Each book...

50.1K

Verified Solution

Question

Programming

Write a c++ class definition for an abstract data typedescribing a bookstore inventory. Each book has the followingattributes:

Book Title (character string);
Book Author (character string);
Book Price (Floating point number having two decimal places);
Count of books on hand (int);

The member functions are as follows:
A constructor that is used to initialize all four elements of thestructure to values inputted by the user;

A function that displays in a readable tabular form the contents ofa book in inventory;

A modify function that has an argument a code ('T', 'A', 'P', or'C') indicating which attribute (title,author,price or count) ofthe indicated book is to be changed. Based upon the attribute code,the appropriate prompt should be displayed to allow the user toenter the new value of the attribute.

Answer & Explanation Solved by verified expert
4.2 Ratings (560 Votes)
include using namespace std class Book private    See Answer
Get Answers to Unlimited Questions

Join us to gain access to millions of questions and expert answers. Enjoy exclusive benefits tailored just for you!

Membership Benefits:
  • Unlimited Question Access with detailed Answers
  • Zin AI - 3 Million Words
  • 10 Dall-E 3 Images
  • 20 Plot Generations
  • Conversation with Dialogue Memory
  • No Ads, Ever!
  • Access to Our Best AI Platform: Flex AI - Your personal assistant for all your inquiries!
Become a Member

Other questions asked by students