just need the code that produces this program
Microsoft Word - p2fa21writeup_3363.docx Copyright Ann Ford Tyson All Rights Reserved P a g e | 1 Programming Assignment 2: Bookstore Sales Estimator COP 3363 - Fall Term 2021 Point Value: 100 points Project Due: 11:59 PM on Thursday 9/23/2021 This assignment requires you to design, write, test and debug a C++ program on your own for the first time this semester. You will write and submit a program which meets the requirements described in this write-up as well as provided course requirements. Learning Objectives To gain experience designing and writing your own C++ program To understand the use of library functions to perform interactive I/O using C++ To practice output formatting To write logical expressions and selection statements in C++ To declare constants and variables appropriately Problem Statement A college bookstore wants to estimate its business for next term. Experience has shown that sales for a course textbook depend greatly on whether a book is required or just suggested reading, and whether or not it has been used for a course in previous terms. For this project, let's call a text that has never been used a new text, and a text that has been used an old text. The bookstore tells you that a new, required book will sell to 90% of prospective course enrollment, but if it has been used before, only 65% will buy. Similarly, 40% of the prospective enrollment will buy a new, suggested book, but just 20% will buy a book which is suggested and is old. Write a program that takes as input a book's identification number, the book's single-copy cost (the price the store pays to buy the book from its supplier), the current number of Copyright Ann Ford Tyson All Rights Reserved P a g e | 2 volumes on hand, the prospective course enrollment (for a particular course), and data that indicates whether the textbook is required or suggested, as well as whether it is new or old. As output, first give the number of books that must be ordered (if any). Then, if books must be ordered, show the total cost the store must pay for the books ordered, and the expected profit on the books ordered assuming that the store pays 80% of list price to obtain them from its supplier, and sells them for list price. Input/Output and An Example This program requires that you read in the following data values: book ID number (an integer) cost per copy (a real number) volume on hand (an integer) expected enrollment (an integer) code for required versus suggested (a character, 'R' or 'S') code for new versus used (a character, 'N or 'O') You will use entirely interactive I/O in this program, that is, all input is typed in at the keyboard by the user (person running the program), and all output goes to the console window. First, your program should print an introductory message, and then prompt the user for the required values. For example, the dialog could go like this: ************************************************** WELCOME TO THE BOOKSTORE ORDER ESTIMATION PROGRAM! ************************************************** Enter the book ID number -> 101 Enter the book's cost per copy -> 12.95 Enter the current volume on hand -> 12 Enter the expected class enrollment -> 21 Is the book required or suggested? Enter 'R' or 'S' -> R Is the book old (has been used before) or new (has not)? Enter 'N' or 'O' -> N Your program must then do the required calculations, and produce output something like this: BOOK ORDER ESTIMATION SUMMARY ----------------------------- Number of Books to Order: 7 Total Cost of this Order: $90.65 Expected Profit on Books Ordered: $22.66 Notice that the number of books to order must be a whole number. When you calculate the number of books to order, take the real number obtained and then find the nearest Copyright Ann Ford Tyson All Rights Reserved P a g e | 3 whole number higher than the real number you calculate. Then use that whole number (an integer) as the number of books which must be ordered. Hint: use a standard C++ function in cmath. If you do not have to order any books, do not print the last two lines given in the sample output, and do not perform the related calculations. Some examples: if you calculate that you need to order 50.3 or 50.7 books, then order 51 books; if you calculate that you need to order 50.0 books, then order 50 books. You may assume that all data items are valid and are input correctly. That is, you do not have to do any bad data checking on this project. Remember to use good style in your program, and make it as user-friendly as possible. The prompts and other output shown above show some acceptable choices. Your output must give all of the elements described, however you may be creative and use alternative prompts, labels, etc. as long as you utilize good style. Some Suggested Test Data Here are some suggested data sets with which to test your program: (1) 327 23.98 0 225 R N (2) 555 35.96 32 45 R O (3) 1011 18.37 130 310 S N (4) 727 31.96 7 151 S O Keep in mind that your program must work correctly for any possible valid data set. The grader will run your program and test it with data in addition to that listed here. A Note About C++ Header Files The TA/grader will take off points for missing required header files. Be sure to include the headers which you need. Note that you may only use standard ANSI C++ header files for all projects in this course. Miscellanous Be sure to read and understand the sections in the Course Syllabus on general project requirements. Also be sure to study the style, documentation and formatting guidelines discussed in the Programming Style Guidelines handout and in the lecture, textbook and recitation sections. Also pay attention to your code's efficiency. Check the project FAQ and Clarifications section on Canvas for any updates. What File To Turn In, File Naming Requirements, and Turning In Your Work to Canvas Turn in your C++ program source file which must be named as follows. Use this format: yourLastNameLowerCase_FSUID_p2.cpp Copyright Ann Ford Tyson All Rights Reserved P a g e | 4 Your FSUID will be unique to you, will typically be your FSU email ID, and will be something like "ab23c." Hence file names will look something like "smith_ab23c_p2.cpp" Submit your single C++ file (.cpp) to Canvas using the Submit button for this assignment. Be sure to download the file from Canvas also after you submit it in order to verify that you submitted the correct program file to Canvas and that it was successfully received by Canvas. Remember that if you do not verify your file submissions properly, it is possible to receive a zero score on any course assignment. Last Update: A. F. Tyson 8/23//2021