public class HW3 { static String[] names = { "Alice Snuffleupagus", "Aloysius Snuffleupagus", "Angry Guy", "Athena", "Baby Bear", "Bart", "Bert", "Betty Lou", "Big Bird", "Brad", "Bruce Stringbean", "Cinderella", "Clementine", "Cookie Monster", "The Count von Count", "Elizabeth", "Elefante", "Elmo", "Ernestine", "Ernie", "Gina", "Gladys", "Grover", "Humpty Dumpty", "Irvine", "Little Bird", "Lulu", "Oscar the Grouch", "Papa Bear", "Placido Flamingo", "Prarie Dawn", "Rubber Duckie", "Rumpelstiltskin", "Sully", "Zoe" }; static float[] payRates = { 0F, 6.25F, 10F, 12F, 15F, 20F, 50F }; public static void main(String[] args) { EmployeeManager employeeManager = new EmployeeManager(); for (int i = 0; i < names.length; i++) { int type = (int)(Math.random() * 3); String name = names[(int)(Math.random() * names.length)]; try { if (type == 0) { Student s = new Student(name, 2009, "SEAS", "Computer Science"); employeeManager.addEmployee(s); } else if (type == 1) { SupportStaff ss = new SupportStaff(name, "Machine Shop", Math.random() < 0.5 ? true : false); employeeManager.addEmployee(ss); } else { Professor p = new Professor(name, "Computer Science", Math.random() < 0.5 ? true : false); employeeManager.addEmployee(p); } } catch (Exception e) { System.out.println(e.getMessage()); } } System.out.println(); for (int i = 0; i < EmployeeManager.MAX_SIZE * 2; i++) { String name = names[(int)(Math.random() * names.length)]; float rate = payRates[(int)(Math.random() * payRates.length)]; try { employeeManager.payEmployee(name, (int)(Math.random() * 40) - 5, rate); } catch (Exception e) { System.out.println(e.getMessage()); } } System.out.println(); employeeManager.printAll(); } }