Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribed

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? exit

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

Database Principles Programming And Performance

Authors: Patrick O'Neil

1st Edition

1558603921, 978-1558603929

More Books

Students also viewed these Databases questions

Question

1. Who should participate and how will participants be recruited?

Answered: 1 week ago

Question

1. Traditional and modern methods of preserving food Articles ?

Answered: 1 week ago

Question

What is sociology and its nature ?

Answered: 1 week ago

Question

What is liquidation ?

Answered: 1 week ago

Question

Explain the different types of Mergers.

Answered: 1 week ago