package emps;

import java.util.List;

public class P5_MinMax_v2 {

	public static void main(String[] args) {
		List<Employee> emps = ObslugaCSV.wczytaj();
		
		Employee max = null;
		Employee min = null;
		
		for(Employee emp : emps) {
			if(max == null || emp.getSalary() > max.getSalary()) {
				max = emp;
			}
			if(min == null || emp.getSalary() < min.getSalary()) {
				min = emp;
			}
		}
		
		System.out.println("max: " + max);
		System.out.println("min: " + min);
	}

}
