1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
ELEN [110]
1 year ago
13

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.
Computers and Technology
1 answer:
4vir4ik [10]1 year ago
5 0

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

<h3>Writting the code in JAVA:</h3>

<em>BEGIN</em>

<em>DECLARE</em>

<em>employeeNames[100] As String</em>

<em>employeeSalaries[100] as float</em>

<em>name as String</em>

<em>salary, totalSalary as float</em>

<em>averageSalary as float</em>

<em>count as integer</em>

<em>x as integer</em>

<em>rangeMin, rangeMax as float</em>

<em />

<em>INITIALIZE</em>

<em>count = 0;</em>

<em>totalSalary =0</em>

<em />

<em />

<em>DISPLAY “Enter employee name. (Enter * to quit.)”</em>

<em>READ name</em>

<em />

<em>//Read Employee data</em>

<em>WHILE name != “*” AND count < 100</em>

<em />

<em>employeeNames [count] = name</em>

<em>DISPLAY“Enter salary for “ + name + “.”</em>

<em>READ salary</em>

<em>employeeSalaries[count] = salary</em>

<em>totalSalary = totalSalary + salary</em>

<em>count = count + 1</em>

<em />

<em>DISPLAY “Enter employee name. (Enter * to quit.)”</em>

<em>READ name</em>

<em />

<em>END WHILE</em>

<em />

<em>//Calculate average salary with mix , max range</em>

<em>averageSalary = totalSalary / count</em>

<em>rangeMin = averageSalary - 5</em>

<em>rangeMax = averageSalary + 5</em>

<em />

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

<em />

<em>For (x = 0; x < count; x++)</em>

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

<em>DISPLAY employeeNames[x] + “\t” + employeeSalaries[x]</em>

<em>END IF</em>

<em>END FOR</em>

<em>END</em>

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

#SPJ1

You might be interested in
How do I send the face to the back? Seriously, I can't find out how...
makvit [3.9K]

Answer:

i think you can layer it :)

Explanation:

nice drawing btw!

8 0
2 years ago
11
siniylev [52]

Answer:

need help too

Explanation:

7 0
2 years ago
A copy of the copyrighted work must be exactly the same as the original to infringe a copyright.
nordsb [41]

Answer:

true

Explanation:

7 0
3 years ago
List seven basic internet components found in a computer tower
Alexxandr [17]
A Mouse and a Keyboard are examples of eternal input devices. The monitor, printer, speaker and Fash drive are all external output devices. Seven basic internal components in a computer tower are the power supply unit, central processing unit, hard disk drive, RAM modules, motherboard, video card and a sound card.
8 0
2 years ago
Read 2 more answers
Which statement regarding dialogues in multiplayer games is true? Dialogues are based only on players’ actions.
emmainna [20.7K]

D. Dialogues are based only on events that have occurred in the game.
8 0
3 years ago
Read 2 more answers
Other questions:
  • If the pc­doctor software is installed on a computer's hard drive, what two different ways can the program be started?
    7·1 answer
  • Disk ________ realigns separated data so that related file pieces are unified.
    6·1 answer
  • What component of a computer system holds the operating system when the computer is not running
    6·2 answers
  • The commands available here change depending on the activity taking place in the presentation window's main work area.
    15·2 answers
  • To format an individual sparkline, select the sparkline you want to format, and then click the Ungroup button in the Group group
    7·1 answer
  • Which of the following techniques would a Baroque composer most likely employ to evoke an affect of agitation? Select one:
    14·1 answer
  • What form of note taking would be MOST beneficial for a visual learner who needs to see the connections between ideas?
    7·1 answer
  • Edhisive 3.5 code practice
    9·1 answer
  • Find the unknown quantities
    12·1 answer
  • What does a blinking yelow light mean on a phillips sonicare toothbrush
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!