Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a C++ program that asks for the following information about a book order. 1. Title 2. Author 3. ISBN (validate 9 or 13 characters)

Write a C++ program that asks for the following information about a book order.

1. Title

2. Author

3. ISBN (validate 9 or 13 characters)

4. Price (validate number < 400)

5. Quantity (number of books to purchase validate > 0 and < 100)

6. Fiction/Non-Fiction (N or F validate)

7. Genre (R romance, D drama, M mystery validate)

Use the following data types:

1. C++ string

2. double

3. int

4. char

5. bool

Additional Requirements:

1. Assume the tax on the total price of the books is 7%.

2. If the quantity is 90-100: Fee $50, 80-89: Fee $40, 70-79: Fee $30, 60-69: Fee $20, less than 60 Fee 10.

3. Use the modulus operator and switch statement to determine the fee.

4. Tax should not be calculated on the fees.

5. A Boolean variable should be used to hold whether the book is Fiction or Non-fiction

6. If the user puts in non-valid data for any of the questions, exit the program.

7. Prompt the user for Fiction/Non-fiction and Genre in a clear manner explaining the char characters to enter for their choice (give a menu).

8. Use an if/else if statement to display the genre in the output.

9. If the book is a non-fiction romance, remove the fee (this if statement should be separate and after the switch statement for the fee.

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

Modern Database Management

Authors: Jeffrey A. Hoffer Fred R. McFadden

4th Edition

0805360476, 978-0805360479

More Books

Students also viewed these Databases questions

Question

4. How long will it take to achieve the goals?

Answered: 1 week ago

Question

An agency that regulates labor markets is the

Answered: 1 week ago