Quiz 10 Solution import java.io.*; import java.util.*; public class PayRoll { //a string which, when encountered, signals the end of input private static final String STOPPER = "quit"; public static void main (String[] args) throws IOException { //Declare and instantiate a Vector called 'staff' Vector staff = new Vector(); //Set up I/O BufferedReader in = new BufferedReader (new FileReader ("c:/empl.txt")); // Using a loop, read in Employee names and salaries, and store // them in 'staff', until you encounter Employee name 'quit'. while (true ){ String input = in.readLine(); if (input.equals(STOPPER)) break; String name = input; int salary = Integer.parseInt(in.readLine()); Employee e = new Employee (salary, name); staff.addElement(e); } // Using a loop, print out, for each Employee in 'staff', his/her // name followed by a space and then by his/her salary. for (int i = 0; i