Programming 2 with Java
Exercise: Company Statistics
The program
CompanyStatistics allows to create statistics on the employees of a
Company.
-
Re-implement the methods that return the following values using streams, lambda expressions and method references:
- the average salary of all employees
- the minimum salary of all employees
- the maximum salary of the employees of a department
- the employee with the lowest salary
- the employee with the highest salary
- the number of employees per department
- the average salary of employees per department
Solution