In this assignment, you will be constructing algorithms for methods/functions that use parameters and may return values. We will be revisiting the Roy L. Fuchs program from Unit 3. Instructions:...

1 answer below »
In this assignment, you will be constructing algorithms for methods/functions that use parameters and may return values. We will be revisiting the Roy L. Fuchs program from Unit 3. Instructions: Develop the following algorithms: 1. Develop an algorithm for a function that has two parameters “min” and “max. The function should ask the user to enter a value between “min” and “max,” and perform an input validation loop to confirm the value entered is in the correct range. The function should return the validated value to the calling program. 2. Develop the algorithm for a function that accepts the monthly amount of sales as a parameter and returns the amount of commission on that sales using the following information: Sales Amount Commission Rate $ 0.00 - $ 30,000.00 4% $ 30,000.01 - $ 60,000.00 8% $ 60,000.01 - $ 75,000.00 10% $ 75,000.01 - $ 100,000.00 12% 3. Develop the algorithm that accepts an array of floating-point numbers as a parameter and returns the sum of the numbers 4. Develop the algorithm that accepts an array of floating-point numbers as a parameter and returns the average of the numbers 5. Redesign the algorithm for the Roy L. Fuchs Used Car Emporium as follows a The company has exactly ten employees. b Use a for loop to: i Input the employee’s name and store it in an array ii Calls the input validation function developed above to get the employee’s monthly sales amount and stores that value in an array. iii Calls the commission function above to find the amount of commission for each employee and stores that value in an array c Calls the summation function above to find the total dollar amount of sales for the month and then display that value with an appropriate label d Calls the summation function above to find the total dollar amount of commission owed and then display that value with an appropriate label e Calls the average function above to find the average sales per salesperson and displays that value with an appropriate label f Calls the average function above to find the average commission per salesperson and displays that value with an appropriate label Requirements: • Show your work in a Word document. o Include all your work for each question. o You can include screenshots of work done on paper. • For all justification exercises, remember to use the definitions and principles that we have learned thus far. • You must prepare a written work where you respond to the programming exercises. The work must comply with APA academic writing standards. You must support your answer using appropriate sources that are properly cited. • Minimum four pages in length, excluding the Title and Reference page. • APA format, including an in-text citation for referenced works
Answered 6 days AfterDec 05, 2021

Answer To: In this assignment, you will be constructing algorithms for methods/functions that use parameters...

Arun Shankar answered on Dec 09 2021
121 Votes
#include
using namespace std;
#define NUM_EMPLOYEES 10
int accept_input_in_range(int m
in, int max)
{
int input = min - 1;
while((input < min) || (input > max))
{
cout << "Enter input: [" << min << " - " << max <<"]: ";
cin >> input;
}
return input;
}
double compute_commission(double sales)
{
if(sales <= 300000)
return 0.04 * sales;
else if(sales <= 60000)
return 0.08 * sales;
else if(sales <= 75000)
return 0.10 * sales;
else if(sales <= 100000)
...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here