I basically am trying to figure out how to store data into an array by calling a method enterSalary() within another method enterAllEmployees(). This is what the assignment is. I don't understand how to do it.
Your solution must:
•
Store the salaries in an array (the department may not hire more than 50 students)
•
Also store the names of the corresponding student workers in an array
•
Your output should include the list of student workers with their salary and an indication of whether their salary is average, above average or below average
For full credit on this problem you must include the following methods:
•
howMany( ) – prompt the user for the number of employees
•
enterAllEmployees() – prompt for name and call enterSalary() for each employee
•
enterSalary( ) – prompt the user for ONE salary, validate this value to determine if it is between $8 and $15 (per hour)
•
sum() calculate and return the sum of the items in the salary array
•
output () call the sum() method, calculate average, build the required output