import java.util.*; class Employee { String name; int empId; String department; int age; String designation; double salary; Employee(String name, int empId, String department, int age, String designation, double salary) { this.name = name; this.empId = empId; this.department = department; this.age = age; this.designation = designation; this.salary = salary; } void display() { System.out.println("Name: " + name + ", EmpID: " + empId + ", Department: " + department + ", Age: " + age + ", Designation: " + designation + ", Salary: " + salary); } } public class P2 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); ArrayList employees = new ArrayList<>(); System.out.print("Enter number of employees (>=5): "); int n = sc.nextInt(); sc.nextLine(); for (int i=0; i maxSalary) { maxSalary = e.salary; highestPaidManager = e; } } if (highestPaidManager != null) { System.out.println("\nHighest Paid Manager in Purchase Department:"); highestPaidManager.display(); } else { System.out.println("\nNo Manager found in Purchase Department."); } sc.close(); } }