Create a class called Employee as follow: public class Employee private int Id; private String FirstName;...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Create a class called Employee as follow: public class Employee private int Id; private String FirstName; private String LastName; private double salary: public Employee(int nid, String S1, String S2, double sl) Id=nid; FirstName=$1; LastName $2; Salary=s1; } public string getFirstName() { return FirstName: public string getLastName() { return LastName; } public int getId() { return id; } public double getsalary() { return Salary: public void setEmplyee(int id, String fn, String In, double sal) { Id=id; } FirstName=fn; LastName-In; Salary sal; Part 2: . Write a method that takes as parameter an array of type Employee and print on screen the Employee names who has the highest salary. • Write a program that do the following: ➤ Create an array of type Employee with size 5. ➤ Ask the user to read 5 employee information and store them inside the array. > Call the above methods. Create a class called Employee as follow: public class Employee private int Id; private String FirstName; private String LastName; private double salary: public Employee(int nid, String S1, String S2, double sl) Id=nid; FirstName=$1; LastName $2; Salary=s1; } public string getFirstName() { return FirstName: public string getLastName() { return LastName; } public int getId() { return id; } public double getsalary() { return Salary: public void setEmplyee(int id, String fn, String In, double sal) { Id=id; } FirstName=fn; LastName-In; Salary sal; Part 2: . Write a method that takes as parameter an array of type Employee and print on screen the Employee names who has the highest salary. • Write a program that do the following: ➤ Create an array of type Employee with size 5. ➤ Ask the user to read 5 employee information and store them inside the array. > Call the above methods.
Expert Answer:
Answer rating: 100% (QA)
Step1 Create Employee class with specified methods as below code as follows Code package comvirtusaProcureToPay import javautilArrayList import javautilScanner public class Employee private int Id pri... View the full answer
Related Book For
Java An Introduction To Problem Solving And Programming
ISBN: 9780134462035
8th Edition
Authors: Walter Savitch
Posted Date:
Students also viewed these programming questions
-
Pokmon GO continues to be one of the highest grossing mobilegames. In the game, you encounter wild pokemon, which you can attempt to catch. Each gamefor Pokemon uses slightly different rules for...
-
Demand function for a firm is given as P-100e, if the firm's average cost (AC) is AC 5+50, determine the firm's maximum profit. (5marks).
-
Your home business uses 570 square feet of your 2,850 square foot home. If household expenses for the year were $28,558, how much was alloted to your business? Amount invested
-
A farmer wants to fence an area of 1.5 million square feet in a rectangular field and then divide it in half with a fence parallel to one of the sides of the rectangle. How can he do this so as to...
-
The following data pertains to the operations of Knight Corporation for 2012: The controller is trying to decide which method of accounting for bad debts to use. The company is attempting to maximize...
-
The Cooper Furniture Company of Potomac, Maryland, assembles two types of chairs (Recliners and Rockers). Separate assembly lines are used for each type of chair. Classify each cost item (AI) as...
-
Refer to the previous question. Morley Properties can hire a consultant to predict the most likely level of demand for this project. This consultant has done many similar studies and has provided...
-
1. (3 points) Find the outcome of the Borda rule for the following 3-voter profile: >1 >2 >3 b b a a a b d d d Is there a profitable manipulation for the 3rd voter?
-
Suppose you have a list of blood platelet counts from 500 patients in a hospital. Which of the following is most helpful in understanding the distribution of those values: frequency table, pie chart,...
-
The standard deviation of returns on ABC Corporation is 25% per year. The correlation coefficient between returns on ABC and the returns on the market portfolio is 0.65. The risk-free rate is...
-
How does the U.S. tax structure influence a firms willingness to finance with debt?
-
Explain the differences between set covering and set partitioning models. Give two applications of each.
-
Rawlsian justice is a philosophical argument in favor intergenerational fairness. What does intergenerational fairness mean in this context? How is this related to CBA? Explain.
-
What are the two items whose sum is the cost of equity?
-
How might the different ages of firms distort comparisons of their fixed assets turnover ratios?
-
AirQual Test Corporation provides on-site air quality testing services. The company has provided the following cost formulas and actual results for the month of February: Revenue Technician wages...
-
Shreemaya Hotel in !adore was facing a problem of low demand for its rooms due to off season. The Managing Director (MD) of the hotel, Mrs. Sakina was very worried. She called upon the Marketing...
-
You have a list of student IDs followed by the course number (separated by a space) that the student is enrolled in. The listing is in no particular order. For example, if student 1 is in CS100 and...
-
Implement your base class for the hierarchy from the previous exercise. Previous exercise. Consider a program that will keep track of the items in a schools library. Draw a class hierarchy, including...
-
Sometimes we would like a class that has just a single unique instance. Create a class Merlin that has one attribute, theWizard, which is static and of type Merlin. The class has only one constructor...
-
Who was Phar-Mors flamboyant Chief Executive Officer?
-
Which of the following generally is not considered something of value? 1. Cash, money or checks 2. Airline miles or hotel credits associated with frequent activity (e.g., frequent flier miles) 3. An...
-
Can you create a graphic that highlights each incidence where Fairmont was not in compliance with company policy that requires explicit approval of all hours of eighty hours or more?
Study smarter with the SolutionInn App