Question Description
Prior to beginning work on this assignment, be sure to review Chapters 3 and 4 in your text, including reviewing corresponding Participation Activities, Challenge Activities, and this week’s laboratories.
You are throwing a giant party at your penthouse in a 25-story building and have invited all your family and friends to celebrate New Year’s Eve. You have also requested services from a party planning company that will arrange DJs, bartenders, servers, caterers, and a band. The main entry to your penthouse is through a standard elevator with a weight capacity of 2,500 pounds. Since you do not want your guests taking the stairs to the 25th floor, you need to program your robot to determine if the elevator can support the weight of your guests. Applying skills acquired this week, develop, compile, and edit as needed a C++ program that
- calculates the current weight on the occupied elevator,
- compares the current weight with the maximum weight allowed, and then
- prints an output stating either “Let’s go” or “This elevator is too heavy by X pounds.”
Your program must use appropriate arithmetic operators; input/output methods; selection statements such as if-else; and looping statements such as while, for, and do-while. Your program should exhibit input data gathering and problem-solving using data structures. You must display the output.
Once you have completed the program, you must provide screenshots of the following in a Word document and submit through Waypoint:
- the header
- the source code
- the output
Next, submit a zip folder that contains the header and the source code through the doc-sharing function on the Week 2 – Zip File Submission page (next page). Ensure that you are sharing the zip folder with your instructor only. Your instructor will run your source code to ensure that the program runs correctly.