☑ Kizspy.me
Hints: to declare the EmployeeList class, you
can use the following statement:
public class EmployeeList extends
ArrayList<Employee> {
11.....
}
The program output might look something like this (using the EmployeeList class):
The employees have been added:
1-Tran Bao An-1000.00-0
| 2-Nguyen Thanh Phong-3000.00-2
3-Le Hong Phong-2000.00-7
4-Huynh Quoc Bao-5000.00-3
5-Phan Van Trung-4000.00-1
Add a new employee:
Enter id:6
Enter name:Nguyen Van Nam
Enter salary:6000
Enter years of experience:5
1.Test getAverageSalary()
2.Test getMinSalary()
The employees have been added:
1-Tran Bao An-1000.00-0
| 2-Nguyen Thanh Phong-3000.00-2
3-Le Hong Phong-2000.00-7
4-Huynh Quoc Bao-5000.00-3
5-Phan Van Trung-4000.00-1
Add a new employee:
Enter id:6
Enter name:Hoang Minh
Enter salary:6000
Enter years of experience:8
1.Test getAverageSalary()
2.Test getEmployee ByMaxYearsOfExperience()
Zoom
+ 100%
Close