package emps;

import java.util.List;

public class P5_MinMax_v1 {

	public static void main(String[] args) {
		List<Employee> emps = ObslugaCSV.wczytaj();
		
		int maxSalary = 0;
		int minSalary = Integer.MAX_VALUE;
		
		String max = "";
		String min = "";
		
		for(Employee emp : emps) {
			if(emp.getSalary() > maxSalary) {
				maxSalary = emp.getSalary();
				max = emp.getFirstName() + " " + emp.getLastName();
			}
			if(emp.getSalary() < minSalary) {
				minSalary = emp.getSalary();
				min = emp.getFirstName() + " " + emp.getLastName();
			}
		}
		
		System.out.println("max: " + maxSalary + " = " + max);
		System.out.println("min: " + minSalary + " = " + min);
	}

}
