Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

This C++ program consists of writing classes that implement an inventory list simulation for a bookstore. The list will be a dynamic array of Book

This C++ program consists of writing classes that implement an inventory list simulation for a bookstore. The list will be a dynamic array of Book objects, each of which stores several pieces of information about a book. You will need to finish the writing of two classes: Book and Store. Here is the full header file for the Book class:

image text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedIf you do not upload the entire solution at once, you can keep me updated in the comments section.

Thanks a lot for your assistance!

// An object of type Book will store information about a single // book. The variable "type" stores the category of the book // (one of the four items in the enumerated type Genre). #1fndef BOOKH #define BOOKH - - - - enum Genre tFICTION, MYSTERY, SCIFI, COMPUTER class Book public: Book); // default constructor, sets up blank book object void Set(const char* t, const char* a, Genre g, double p); // the Set function should allow incoming data to be received through // parameters and loaded into the member data of the object. (i.e // this function "sets" the state of the object to the data passed in) // The parameters t, a, g, and p represent the title, author, genre, // and price of the book, respectively. // returns the title stored in the object const char* GetTitle() const const char* GetAuthor) const; /7 returns the author double GetPrice () consti Genre GetGenre) const; // returns the price // returns the genre void Display) const; // described below private: char title[31]; // may assume title is 30 characters or less char author[21] may assume author name is 20 characters or less Genre type; double price; /* Display() function The member function Display() should print out a Book object on one line as follows, in an organized manner. (Monetary output should be in dollars and cents notation, to two decimal places): Title Author Genre Price Examples: Programming for Dummies Mutant Space Weasels Marvin Dipwart Bob Myers Computer 24.95 Sci-Fi $5.95 #endif

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

Beginning C# 2005 Databases

Authors: Karli Watson

1st Edition

0470044063, 978-0470044063

More Books

Students also viewed these Databases questions

Question

1. Identify the sources for this conflict.

Answered: 1 week ago