Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Advanced Looping Implementations in C++ As the manager of Pools, Pools and Pools you would like to create a report that tracks the sales of

Advanced Looping Implementations in C++ As the manager of Pools, Pools and Pools you would like to create a report that tracks the sales of your employees. You currently have three sales people Tom, Chris, and Mary. Write a program that prompts the user for a salespersons initial (T, C, or M) then allows the user to enter up to 5 sale amounts at a time for the salesperson. Calculate and display the salespersons commission as 17% of the sales entered. Add the commission to a running total for that salesperson. The program should terminate when the user types a Z. A final report should display each salespersons total commission earned along with their average sales. 1. Using the parameters above, create a detailed flowchart or pseudocode outlining your program design. Some things to keep in mind while developing your solution: The majority of program development follows the steps of gathering input, perform calculations, then display output. Create a separate list of variables and their data types; variables can be added to the list as you continue developing your solution Start with the basic program flow for a single salesperson Add specifics of the program as you further develop the solution Add the error checking features 2. From your flowchart or pseudocode, translate each step into C++ code to develop your code. Additional information: Up to 5 sales may be entered for the employees more than once. Your final report should include the total sales for all of the entries made for the employee. For example, Tom may have 2 sales, then Mary with 3 followed by Tom again with 4 sales. Final output for Tom would be the total of his 6 sales. Your program should efficiently implement all 3 of the looping constructs. DO NOT use goto statements. They are considered poor programming structures. Implement shortcut operators where appropriate. Your program should handle invalid entries for the salespersons initials. Once a valid salespersons initial has been entered, the program should continue prompting the user for a valid number of sales - (no negative values or values exceeding the limit of 5 sales entries per salesperson at a time). Output should be in a report format labeled, aligned, and formatted to 2 decimal places. Break; statements may only be implemented in switch statements; not in if or looping statements, No continue; statements. Make sure you are using the correct data types and descriptive variable names. Do not use arrays in your code. Add a comment to the top of your program that includes your name, the program name, and a description of the program code. Include descriptive comments throughout your program. Test your calculations! Save the program as Pools lastname.cpp or main.cpp 3. After completing the assignment, attach your Pools lastname.cpp or main.cpp file and flowchart/pseudocode to the Assessment link for grading.

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

More Books

Students also viewed these Databases questions

Question

How to reverse a Armstrong number by using double linked list ?

Answered: 1 week ago