Input a list of employee names and salaries and store them in parallel arrays. End the input with a sentinel value. The salaries should be floating point numbers Salaries should be input in even hundreds. For example, a salary of 36,510 should be input as 36.5 and a salary of 69,030 should be entered as 69.0. Find the average of all the salaries of the employees. Then find the names and salaries of any employee who's salary is within 5,000 of the average. So if the average is 30,000 and an employee earns 33,000, his/her name would be found. Display the following using proper labels. Save your file using the naming format LASTNAME_FIRSTNAME_M08 FE. Turn in your file by clicking on the Start Here button in the upper right corner of your screen. 1.Display the names and salaries of all the employees. 2. Display the average of all the salaries 3. Display all employees that are within 5,000 range of the average.

Answers

Answer 1

Using the knowledge in computational language in JAVA it is possible to write the code being Input a list of employee names and salaries and store them in parallel arrays

Writting the code in JAVA:

BEGIN

DECLARE

employeeNames[100] As String

employeeSalaries[100] as float

name as String

salary, totalSalary as float

averageSalary as float

count as integer

x as integer

rangeMin, rangeMax as float

INITIALIZE

count = 0;

totalSalary =0

DISPLAY “Enter employee name. (Enter * to quit.)”

READ name

//Read Employee data

WHILE name != “*” AND count < 100

employeeNames [count] = name

DISPLAY“Enter salary for “ + name + “.”

READ salary

employeeSalaries[count] = salary

totalSalary = totalSalary + salary

count = count + 1

DISPLAY “Enter employee name. (Enter * to quit.)”

READ name

END WHILE

//Calculate average salary with mix , max range

averageSalary = totalSalary / count

rangeMin = averageSalary - 5

rangeMax = averageSalary + 5

DISPLAY “The following employees have a salary within $5,000 of the mean salary of “ + averageSalary + “.”

For (x = 0; x < count; x++)

IF (employeeSalaries[x] >= rangeMin OR employeeSalaries[x] <= rangeMax )

DISPLAY employeeNames[x] + “\t” + employeeSalaries[x]

END IF

END FOR

END

See more about JAVA at brainly.com/question/12978370

#SPJ1

Input A List Of Employee Names And Salaries And Store Them In Parallel Arrays. End The Input With A Sentinel

Related Questions

convert the following decimaal numbers to octal numbers
1. 500
2. 169
3. 53
4.426

Answers

1. 500--->764

2. 169--->251

3. 53--->65

4.426--->652

Other Questions
Suppose you drop a feather and a hammer on the moon from the same height at the same time. what will happen? A company's balance sheet shows: cash $38,000, accounts receivable $24,000, office equipment $58,000, and accounts payable $25,000. What is the amount of owner's equity? In nature, all organisms are subject to natural selection. some scientists have theorized that we have stopped evolving because we can control our environment and reduce selective pressures. do you agree or disagree that humans have stopped evolving? why? CharCore mixes together wood chips and pine oil. After joint manufacturing costs of $2,000 have been incurred, the mixture separates into two products, granulated charcoal and methyl alcohol. At the split-off point, granulated charcoal can be sold for $5,000 and the alcohol can be sold for $9,000. The charcoal can be further processed at a cost of $6,000 to make air filters which could be sold for $15,000. The alcohol can be further processed at a cost of $7,000 to make a cleaning solvent which could be sold for $14,000. What is the net increase (decrease) in operating income from cleaning solvents? If f(x) = 5x, what is (x)? What are your greatest strengths? Explain three ways you can critically analyze sources to determine if they are scholarly Particulates can:_____.a. cause acid rain b. reduce photosynthesis c. cause lung and heart disease d. none of these In what two ways did the soviets stray from the ideas about communism advanced by karl max What expression is equivalent to (9x^2 + 2x -7)(x - 4) If the probability of a new employee in a fast-food chain still being with the company at the end of the year is 0. 5, what is the probability that out of 8 newly hired people? What organs work together in the human body or which organs are grouped together?. Britain wanted control over the ____ because it was the shortest naval route between ______ and _______ Title vii of the civil rights act applies to employers and labor unions with at least. Due to its motion in the magnetic field of the bar magnet, the charge will experience a force in which direction? Categorize the following situation as legal, ethical, neither, or both: a nurse reports a coworker who is pocketing drugs from a drawer in a patient's room. a. ethical b. legal c. both legal and ethical d. neither legal nor ethical If the percent yield for the following reaction is 65.0%, how many grams of KClO3 are needed to produce 8.00 g of O2? Find the missing length indicated. Republican barry goldwater: a. support for large corporations. b. expansion of the military-industrial complex. c. all of the above d. pushed for a nuclear weapons buildup. How will sunlight most likely affect a black shirt on a hot summer day? the temperature of the shirt will depend on how much sunlight is diffracted around the shirt. the temperature of the shirt will not change because the sunlight is transmitted through the shirt to the body. the temperature of the shirt will decrease because most of the light is reflected off of the shirt. the temperature of the shirt will increase because all wavelengths of light are absorbed by the shirt.