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
What is an compiler?
marissa [1.9K]
The accurate answer is

A compiler takes your source code, it converts the entire thing into machine language and then stores these equivalent machine language instructions in a separate file. We programmers call that the "executable file.

Glad to help :)<span />
6 0
3 years ago
Read 2 more answers
FTP is commonly used to __________ and __________ files to a server.
Aleks [24]

Answer:

upload; download

Explanation:

FTP (File Transfer Protocol) is an internet protocol used to upload and download a file to a server, there are some programs help us to transfer this data to a server, in some cases, we're going to need these programs to upload website files to the server like images or videos, or some websites where do you need a user and passwords to upload file by FTP

8 0
3 years ago
What are some examples of environmental technology
Zarrin [17]
Some examples of environmental technology is recycling.
3 0
3 years ago
What does "CPU" stand for?
MrMuchimi
Central processing unit
7 0
3 years ago
Read 2 more answers
Select the correct line of missing code to create an output of "hello."
s2008m [1.1K]

Answer:

B

Explanation:

This feels like an error on the question issuer's part.

3 0
2 years ago
Other questions:
  • Henri is working in a complex financial spreadsheet that has hundreds of columns of data. If he is at column AN and would like t
    11·1 answer
  • What is the next series of dragon ball super
    6·2 answers
  • 1. What is the main factor that affects Earth’s average temperature?
    12·1 answer
  • Most browsers allow you to maintain your most frequently visited websites. what is this called? Special place holder, secret lis
    6·2 answers
  • By Carl Sandburg
    6·1 answer
  • DJ Davon is making a playlist for an internet radio show; he is trying to decide what 1212 songs to play and in what order they
    12·1 answer
  • Let x = ["Red", 2.55,"Green", 3,"Black","false"], then solve the following:
    7·1 answer
  • Discussion Topic
    8·1 answer
  • Write a for loop that uses the loop control variable to take on the values 0 through 10.
    10·1 answer
  • Write a Pascal program that will prompt the user to enter the radius of a circle.
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!