☑Kizspy.me
employeeld-employeeName-employeeSalary-
yearsOfExperience. The employeeSalary is
formatted with two decimal place.
Write a class EmployeeList which extends from ArrayList (ArrayList is a collection) with the following
information:
EmployeeList
Where:
5 of 6
Paper No: 1
+getAverageSalary(baseSalary:double):
double
+getEmployeeByMaxYearsOfExperience
(): Employee
getAverageSalary(baseSalary:double):
double return the average the salaries of
employees whose salaries are greater than
baseSalary. If no matching data is found,
return 0
.getEmployeeByMaxYearsOfExperience
():
Employee return the employee with the that
have largest year of experience. Assume that
there is only one employee with the most years
of experience on the list.
Hints: to declare the EmployeeList class, you
can use the following statement:
public class EmployeeList extends
ArrayList<Employee> {
11.....
Zoom
+ 100%
}
Close