Question: Write a C++ program to aid the Bookstore in estimating its business for next quarter. Experience has shown that sales depend on whether a book

Write a C++ program to aid the Bookstore in estimating its business for next quarter. Experience has shown that sales depend on whether a book is required or suggested, and on whether it has been used as a text during a previous quarter or if this is the first time it has neen ordered by a faculty member. A new, required book will sell to 90% (.90) of expected enrollment, but if it has been used before only 65% of the expected enrollment will buy it. Similarly, 40% of the expected enrollment will buy a newly suggested book, but only 20% will purchase a previously suggested book. INPUT Your program is to prompt the user for: - the book's 10 digit ISBN number (store as a string) - the list price per copy - the expected class enrollment - code of 'R'for required text or code of 'S' for suggested text - code of 'N' for a new text or code of 'O' for a text that has been used in a previous quarter CALCULATE Calculate the number of copies needed and the profit if the store pays 80% of list (use global define for this). For the number of books to order, round to the nearest whole book.Use one function to calculate number of books, one function to calculate the profit, and one function to output.

Checkpoints 1) Include name, e-mail, and lab# as comment andprint same to output 2) Minimum of three (3) comments in each function (Purpose: Pre: Post:) 3) Use a globally defined constant for the rate of profit 4) Input may not be case sensitive. That is, if user enters r change it to R immediately. To do this use if() and assign uppercase value or you may use toupper() function. Only an error message should be output and nothing more if data is erroneous. Use exit() function 5) A function must be used to calculate the number of books to be ordered. Round to the nearest whole number. Hint: static_cast (x + .5) 6) A function must be used to calculate the profit given the number of books and unit price. 7) One function must be used for all the output 8) Output must be formatted using dollar sign and 2 decimal place as shown on page 1.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!