Question: Write a C++program to aid the DeAnza 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 DeAnza 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 quarteror if thisis 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 aprevious quarterCALCULATECalculate 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. OUTPUT A sample run might look like this:Sample Run 1Enter book number: 0755798652Enter price per copy: 34.98Enter expected class enrollment: 35Enter 'R' if required or 'S' if suggested: rEnter 'N' if new or 'O' if not a new text: OISBN: 0755798652Copies Needed:23Profit: $ 160.91Sample Run 2Enter book number: 0755798652Enter price per copy: 34.98Enter expected class enrollment: 34Enter 'R' if required or 'S' if suggested: rEnter 'N' if new or 'O' if not a new text: OISBN: 0755798652Copies Needed:22Profit: $ 153.91 2TEST DATA0755798652,34.98,35,R,O0755798652,34.98,34,R,O2462462464,5.95,40,S,O8953647888, 65.99, 35, N, YTHEME ISSUESFunctions (pass by value), IF Control Structures, character type, rounding

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!