Which Statement Do I replace?

I am doing a lab assignment using arrays. If you read the directions, it says I need to replace both statements with one function. What statements are they referring to? The "if" and "while"? I'm also unsure of what to put in the parameters of the function. It says to put one employeeId in for the parameters, but I am not told to make a variable called employeeId. I only have an array.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
/*  TODO (STEP 1):

                Replace both statements with one function call to
                InputEmployeeWage, where the next employee id in
                employeeIds array is passed to the function and
                the return value is assigned to the corresponding
                employee's wage in employeeWages array
        */

        cout << "Enter wages for employee "
             << employeeIds[count] << ": ";

        cin >> employeeWages[count];

		InputEmployeeWage(employeeId);

        


        if( count < MAX_EMP )
        {
            cout << "\nAnother (y or n): ";
            cin >> response;
            response = toupper(response);
        }

    }while(response == 'Y' && count < MAX_EMP);

    cout << fixed << showpoint << setprecision(2);
    cout << "\n ID     Wage" << endl;



Here is how the function is supposed to work:

1
2
3
4
5
6
7
8
9
10
11
/*  TODO (STEP 1):  Define InputEmployeeWage function

    Function to prompt and input wages for one employee.

    Parameters:
        in: empId
    Precondition:
        empId is id for employee whose wages will be input
    Postcondition:
        returns a double value for input wages
*/
bump
Here is the previous part of the program if that helps:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#include<iostream>
#include<iomanip>
using namespace std;

/*  TODO: Declare function prototypes during each step.

    NOTE: See comments following main() for function specifications
          regarding return types, function names, and parameter lists.
*/
void InputEmployeeWage(int employeeId);
void GetTotalWages(double employeeWages[], int);
void GetLargestValue(double employeeWages[], int);
void GetIndexOfSmallest(double employeeWages[], int);
void PrintEmployeeList(int employeeIds[], double employeeWages[], int);


//------------------------------------------------------------------------------

int main()
{
    const int MAX_EMP = 5;

    int employeeIds[MAX_EMP] = { 1001, 1002, 1003, 1004, 1005 };
    double employeeWages[MAX_EMP];

    char response;
    int count = 0;
    do
    {
Topic archived. No new replies allowed.