Answered step by step
Verified Expert Solution
Question
1 Approved Answer
c++ only Problem 2: Create a program (32 points) ABC Bookstore sells all books for 2.99. Use the following class to write a COMPLETE program
c++ only
Problem 2: Create a program (32 points) ABC Bookstore sells all books for 2.99. Use the following class to write a COMPLETE program that matches the sample run. Feel free to create any additional classes (0 points if you do not use the Book class provided below to hold book information). (correctly using the Book class to store info - 12 points, correctly matching the sample run - 13 points, continuously running - 7 points) class Book{ public: std::string name; float price; Sample run: Adding book... Do you know the book name? no All books so far: unknown price: 2.99 Book(std::string name, float price) { this->name=name; this->price=price; } Book(float price) { this->name="unknown"; this->price=price; } Adding book... Do you know the book name? no All books so far: unknown price: 2.99 unknown price: 2.99 }; Adding book... Do you know the book name? yes Enter book name: Book1 All books so far: unknown price: 2.99 unknown price: 2.99 Book1 price: 2.99 Adding book... Do you know the book name? exitStep 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