Create the program uses two arrays to hold employee names

Assignment Help Programming Languages
Reference no: EM1372512

Create a program that uses two arrays: one to hold employee names and one to hold employee salaries (standard US currency, two decimal points). The program should prompt the user to enter employee names and salaries (see screenshot for details). The just-entered employee name should be printed when prompting for their salary.

After all employees have been entered, present the user with a menu, implemented with a switch, of actions that can be taken with the data that has been entered. This menu should be presented until the user chooses to quit. The user should be able to:

• print all employees and salaries,
• print the maximum salary and who makes it,
• print the minimum salary and who makes it,
• print the average salary and how many employees make more, less, or equal to the average,
• and quit.

You should have at least four methods for this project. One method, printAll(), should simply print all employees and their salaries (using fixed width columns, see System.out.printf(...)) line-by-line. The second method, getMaxSalaryIndex() should walk through the salary array, determine the maximum salary, and return the index of that salary. The third method, getMinSalaryIndex() should be a clone of getMaxSalaryIndex(), but should determine the smallest salary and return the index of that salary. The fourth method, printAverageStats() should calculate the average salary from the salary array and should then walk back over the array.

Reference no: EM1372512

Questions Cloud

Calculate the firm current contribution margin : Brazen, Corporation produces sound amplifiers for electric guitars. The company's income statement showed the following;
What are different ways of measuring global inequality : Why should a profit maximizing manager who is setting prices care about elasticity demand curve for a product. Elasticity only accounts for how price changes revenue.
What are the social structure : What are the social structure described by Durkheim,Tonnies, and Lenski? How does it which comes closest to matching certain social setting of to day?
Find the force provided by the cable : A floodlight with a mass of 20.0 kg is used to clarify the parking lot. The floodlight is supported at the end of a horizontal beam that is hinged to a vertical pole.
Create the program uses two arrays to hold employee names : Create the program which uses two arrays: one to hold employee names and one to hold employee salaries (standard US currency, two decimal points). The program must prompt user to enter employee names.
Calculate value of price elasticity of demand : For a product, at a price of $3, quantity demanded is 60 units and at a price of $5 quantity demanded is 40 units. Using midpoint formula, calculate value of price elasticity of demand.
Elements-functions of god myths : Explain the elements and functions of god myths. Also summarize the elements and functions shared by female and male divine
Determine the radius of the tire : An 10m, 210N uniform ladder rests against a smooth wall. The coefficient of static friction between the ladder and the ground is 0.55, and the ladder makes a 50° angle with the ground. How far up the ladder can an 850N person climb before ladder b..
Estimate the npv and irr : A drug company produces and sells generic over counter drugs in plants located throughout the country. One of its plants is trying to decide whether to automate a portion of its packaging process

Reviews

Write a Review

Programming Languages Questions & Answers

  Write program to prints question do you want to continue

Write a program which prints question"do you want to continue?"and reads user input. if user input is"y", "yes", "ok", "sure", or "why not?" , print out "ok".

  Program to convert temperature in celcius from fahrenheit

Write the program which accepts the temperature in Fahrenheit from user and conversts it to Celsius by subtracting 32 from Fahrenheit value and multiplying result by 5/9. Show both values.

  Write program in mips to compute average of series of number

Write program in MIPS which computes average of a series of entered numbers. User will enter a sequence of integers. When the user enters a negative number.

  Draw diagram shows occupancy of buffer as function of time

A transmitter with rate R bps serves the buffer by sending the bits whenever available. Draw a diagram that shows the occupancy of the buffer as a function of time, for different ranges of values for R.

  Write application to inputs ten numbers from user

Write the application to inputs ten numbers from user, each number can be between 10 and 100, inclusive. As each number is read in determine if it is number already entered.

  Give value of mytop and contents of the array

Assume that stack is the class described in this section with stacktype set to int and stack_capacity or mycapacity set to 5. Give the value of mytop and the contents of the array.

  Program in visual basic to calculate area of triangle

Write a program in visual basic to calculate area of a triangle.

  Payroll program for a company

Write complete PAYROLL program for a company in which each employee falls into one of 3 categories - Administrative, Factory Employee or Salesperson.

  Write down a method which is passed string argument

Write down a method, getFirstLine, which is passed a String argument and that returns first line. (Recall that lines are terminated with the "n" character.)

  Program to output circle-s radius-diameter-circumference

Write a program to prompt the user to enter center and a point on circle. Program must then output circle's radius, diameter, circumference, and area.

  Software system to manage records of patients

A software system is to be developed to manage the records of patients who enter a clinic for treatment. The records include records of the all regular patient monitoring.

  Write program in java to input basic salary of persons

Write the program in java to input basic salary of 15 persons. Each one of them gets 25% of basic as hra (house rent allowance), 15 % of basic as conveyance and 10 % of basic as entertainment allowance.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd