Question
The program will determine the winner of a sales contest. The salesperson who sold the most units wins the contest. Read the salesperson ID number
The program will determine the winner of a sales contest. The salesperson who sold the most units wins the contest. Read the salesperson ID number and the number of units sold by each salesperson. Determine and display the winner of the contest. If the winner sold more than or equal to1000 units, display excellent. If less than 1000 but greater than 749 units, display very good, otherwise display good.
The program should provide a mechanism to control the loop of reading input. For example, the program will keep reading input until the user enters sentinel number. Another example is that, the user is firstly asked for the number of person he or she wants to enter.
User-defined Functions:
The program should provide the following functions: a. getWinner to determine and display the winner (the salesperson who sold the most units).
b. displayStatus to display excellent, good or very good
Note: You may want to define other functions if necessary. Use appropriate parameters/ arguments, pass by value or pass by reference. You are not allowed to use global variables.
QUESTION 2 The program will determine the winner of a sales contest. The salesperson who sold the most units wins the contest. Read the salesperson ID number and the number of units sold by each salesperson. Determine and display the winner of the contest. If the winner sold more than or equal to 1000 units, display "excellent. If less than 1000 but greater than 749 units, display "very good, otherwise display good. The program should provide a mechanism to control the loop of reading input. For example, the program will keep reading input until the user enters sentinel number. Another example is that, the user is firstly asked for the number of person he or she wants to enter. User-defined Functions: The program should provide the following functions: a. getWinner to determine and display the winner (the salesperson who sold the most units). b. displayStatus to display excellent, good or very good Note: You may want to define other functions if necessary. Use appropriate parameters/ arguments, pass by value or pass by reference. You are not allowed to use global variablesStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started