Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Java Expert


Home >> Java

Input a list of employee names and salaries, and determine the mean (average) salary as well as the minimum salary and maximum salary.

Design a program in pseudocode that solves this problem. You are required to generate only the pseudocode - No charting or analysis section is required, but you may have to incorporate the bubble sort algorithm to determine the minimum and maximum salary.

Integer variables: Sum, Count1, Count2, and K

Float variables: Score and Average

1 Declare Medieval[100] As Float

2 Set Sum = 0

3 Set Count1 = 0

4 Write "Enter a test score (or 999 to quit): "

5 Input Score

6 While Score != 999

7 Set Medieval[Count1] = Score

8 Set Count1 = Count1 + 1

9 Set Sum = Sum + Score

10 Write "Enter another score or 999 to quit: "

11 Input Score

12 End While

13 Set Average = Sum/Count1

14 Set Count2 = 0

15 Set K = 0

16 While K Average Then

18 Set Count2 = Count2 + 1

19 End If

20 Set K = K + 1

21 End While

22 Write "The average is:" + Average

23 Write "The number of scores above the average is: " + Count2

24 Write "The number of scores below the average is: " + (Count1 - Count2

My Pseudocode

Declare Names[30], Salaries[30]

Declare Sum as Float

Declare Count as Integer

Declare K as Integer

Declare Average as Float

Declare StudentName As String

Set Sum = 0

Set Count = 0

Set K = 1

Write "Enter Name; enter " when done."

Input StudentName

While StudentName != "*"

Input Name, Salary

While Salary "0"

Set Count1 = Count1 + 1

Set Sum = Sum + Salary

Write "Enter Name and Salary

Input Name, Salary

End While

Set Average = Sum / Count1

Set Count2 = 0

Set Count3 = 0

For K = 1 Step 1 to Count1

If Salary K > Average Then

Set Count2 = Count2 + 1

End If

If Salary K < Average Then

Set Count3 = Count3 + 1

End If

End For

End While

Write "Average Salary: $", Average

Write "Maximum Salary:", Count2

Write "Minimum Salary:", Count3

Java, Programming

  • Category:- Java
  • Reference No.:- M91374786
  • Price:- $40

Guranteed 36 Hours Delivery, In Price:- $40

Have any Question?


Related Questions in Java

Retail price calculatorwrite a java program that asks the

Retail Price Calculator Write a JAVA program that asks the user to enter an item's wholesale cost and its markup percentage. It should then display the item's retail price. For example: (If an item's wholesale cost is 5. ...

Assignment - java program using array of objectsobjectives

Assignment - JAVA Program using array of objects Objectives - This assessment item relates to the course learning outcomes as stated in the Unit Profile. Details - For this assignment, you are required to develop a Menu ...

In ruby the hash class inherits from enumerable suggesting

In Ruby, the Hash class inherits from Enumerable, suggesting to a programmer that Hashes are collections. In Java, however, the Map classes are not part of the JCF (Java Collections Framework). For each language, provide ...

Assignment taskwrite a java console application that allows

Assignment task Write a java console application that allows the user to read, validate, store, display, sort and search data such as flight departure city (String), flight number (integer), flight distance (integer), fl ...

Overviewyou are required to use java se 80 and javafx to

Overview You are required to use Java SE 8.0 and JavaFX to develop a Graphical User Interface (GUI) for the FlexiRent rental property management program created in Assignment 1. This assignment is designed to help you: 1 ...

Assignment - method in our madnessthe emphasis for this

Assignment - "Method in our Madness" The emphasis for this assignment is methods with parameters. In preparation for this assignment, create a folder called Assign_3 for the DrJava projects for the assignment. A Cityscap ...

Assignment game prototypeoverviewfor this assessment task

Assignment: Game Prototype Overview For this assessment task you are expected to construct a prototype level/area as a "proof of concept" for the game that you have designed in Assignment 1. The prototype should function ...

Simple order processing systemquestion given the classes

Simple Order Processing System Question: Given the classes Ship (with getter and setter), Speedboat, and SpeedboatTest. Answer the following questions: Refine the whole application (all classes) and create Abstract class ...

Assessment socket programmingtaskwrite a java gui program

Assessment: Socket Programming Task Write a JAVA GUI program that would facilitate text chatting/exchanging between two or multiple computers over the network/internet, using the concept of JAVA socket programming. If yo ...

Operating systems assignment -problem 1 sharing the bridgea

Operating Systems Assignment - Problem 1: Sharing the Bridge A new single lane bridge is constructed to connect the North Island of New Zealand to the South Island of New Zealand. Farmers from each island use the bridge ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As