Question: 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
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.
Step by Step Solution
3.44 Rating (154 Votes )
There are 3 Steps involved in it
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 full answer
Get step-by-step solutions from verified subject matter experts
