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]
2 years 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]2 years 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
Your company is implementing a wireless network and is concerned that someone from a competing company could stand outside the b
Mila [183]

Answer:

(A)AES

Explanation:

WPA2 (Wi-Fi Protected Access 2) is a security protocol which was developed by the Wi-Fi Alliance in 2004. It was used to replace the security protocol of WEP(Wired Equivalent Privacy) and WPA.

Unlike the previous security protocol, WPA2 uses the Dvanve Encryption Standard (AES) instead of the RC4 stream cipher. WPA3 has been developed but it is not yet widely in use.

4 0
4 years ago
Hat is the purpose of the domain name?
Andreyy89

B because it is true it is a government website because the “ gov “ stands for government.

~ Destiny

3 0
3 years ago
Read 2 more answers
Write a script that will read from a file x and y data points in thefollowing format:
worty [1.4K]

Answer /Explanation

load hw92.dat

FID = fopen(file, 'r');

if FID == -1  

   fprintf('ERROR CANNOT OPEN FILE TO READ!');  

else

   fclose(file);

The we have:

datacell = textscan(FID, 'x%fy%f', 'CollectData', 1);

xycoords = datacell{1};

x 0 y 1

x 1.3 y 2.2

x 2.2 y 6

x 3.4 y 7.4

x 4.2 y 5.5

x 4.4 y 4.5

x 6.2 y 7.8

x 7.7 y 11.1

x 8.2 y 11.5

x 9.9 y 15.2

x 7.2 y 9.5

x 8.9 y 12.5

end

8 0
3 years ago
Why might you want to save a downloaded file to your computer first instead of running it immediately?
sukhopar [10]

Answer:

Explanation:

Run: Choose Run when you only need the download once. Perhaps it’s a song or video you only plan to listen to or watch once. Another scenario might be an installation program that, when run, installs software on your machine in other, permanent locations. Once installed, you probably don’t need the installer again.

Save: When you want to keep whatever it is you’ve downloaded, choose Save. You can still run it, or whatever else you’d like to do with it, but you’ll need to do that yourself. You’ll also want to decide where, on your computer, to keep the file.

<em>Save and run: Use this option when you want to do both: save the file to a location you control, and then immediately run it. </em>

<em />

8 0
3 years ago
What are the six critical components of an information system? Select three of the six components, and describe a potential vuln
Blizzard [7]
People, procedures and instructions, data, software, information technology infrastructure, internal controls.
7 0
3 years ago
Other questions:
  • Tower defense is included under which genre of game
    15·2 answers
  • ​printers, monitors,​ tablets, cpus, and laptops are examples of​ ____________.
    14·1 answer
  • In a computerized accounting system, each transaction that is analyzed must be entered by hand into the appropriate journal and
    12·2 answers
  • Match the job titles to the tasks
    11·2 answers
  • Place the steps in order to keep a graphic from spilling over into the next page and to include the text it is assciated with.
    12·1 answer
  • Which is a common problem for inserting pictures into placeholders?
    10·1 answer
  • This is a program that calculates information about orders of shirts and pants. All orders have a quantity and a color. Write a
    7·1 answer
  • Hurry im TIMED
    8·1 answer
  • Create a variable in php to store your university information and parse using jQuery Ajax and print your name. The variable must
    12·1 answer
  • ASAP 50 POINTS
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!