Question: Write the application class and define: a method that finds and returns the employee who earns the lowest salary, a method that prints all employees

 Write the application class and define: a method that finds and

Write the application class and define:

  1. a method that finds and returns the employee who earns the lowest salary,
  2. a method that prints all employees in the array
  3. a method that returns the average salary
  4. the main method that creates an array of Employee, then test a), b), c)

import java.util.Scanner; public class Employee public int id; public String name; public double salary; public void Input() { System.out.println("Enter name: "); name = new Scanner(System.in).nextLine(); System.out.println("Enter ID: "); id = Integer.parseInt(new Scanner(System.in).nextLine()); System.out.println("Enter Salary: "); salary - Double.parseDouble(new Scanner(System.in).nextLine()); } public void Output() { System.out.printf("Name: $155, ID: %255, Grade: %3$s ", name, id, salary); 3 public String toString() { return String.format("Name: %15, ID: $2$, Grade: %3$s", name, id, salary); } }

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!