Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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. image text in transcribed

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 variables

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

Main Memory Database Systems

Authors: Frans Faerber, Alfons Kemper, Per-Åke Alfons

1st Edition

1680833243, 978-1680833249

More Books

Students also viewed these Databases questions

Question

What is adverse impact? How can it be proved?

Answered: 1 week ago