package emps;

import java.util.List;
import java.util.stream.Collectors;

public class F4a_SredniaProgramistow {
    public static void main(String[] args) {
        List<Employee> emps = ObslugaCSV.wczytaj();

        double avg = emps.stream()
                .filter(emp -> "Programmer".equals(emp.getJobTitle()))
                .mapToInt(Employee::getSalary)
                .average()
                .orElse(0);
        System.out.println(avg);

    }
}
