package emps;

import java.util.Comparator;
import java.util.List;

public class P6_Sortowanie_v5 {

	public static void main(String[] args) {
		List<Employee> emps = ObslugaCSV.wczytaj();
		emps.sort(Comparator.comparing(Employee::getLastName).thenComparing(Employee::getFirstName));
		
		for(Employee emp : emps) {
			System.out.printf("|%-12s|%-15s|%-31s|%6d |%-20s|\n",
					emp.getFirstName(), emp.getLastName(), emp.getJobTitle(), emp.getSalary(), emp.getCity());
		}
	}

}
