import java.util.Scanner; import java.io.*; public class CarDealer { /** 11/21/2018 * This class answers question VI on Sample Exam 2. */ public static void main(String[] args) throws IOException{ final int SIZE = 10; String[] names = new String[SIZE]; int[] numCars = new int[SIZE]; readData(names, numCars); printArray(numCars); int totalCars = sumArr(numCars); System.out.println("Total number of cars sold: " + totalCars); mostCars(names, numCars); if (hasDuplicates(numCars)) System.out.println("Yes, there is more than one with same amount."); else System.out.println("All values are unique."); } // methods /* readData reads data from a file into two parallel arrays. * @param names * @param numCars */ public static void readData(String[] names, int[] numCars) throws IOException { Scanner infile = new Scanner(new File("salespeople.txt")); int idx=0; while (infile.hasNext() && idx