/** * Problem states that there are exactly 10 salespeople. We will read in this * data from a file called salespeople.txt * CarDealer2 MODIFIES THE CARDEALER PGM TO USE PARTIALLY POPULATED ARRAYS. */ import java.io.*; import java.util.Scanner; public class CarDealer2 { public static void main(String[] args) throws IOException { String filename = "salespeople.txt"; // File file = new File(filename); Scanner infile = new Scanner(new File(filename)); final int SIZE = 100; String[] names = new String[SIZE]; int[] carsSold = new int[SIZE]; int size = populateArrays(infile, names, carsSold); printArrays(names, carsSold, size); // 1. total System.out.println("sum of all cars sold is: " + sum(carsSold, size)); // 2. max int index = maximum(carsSold, size); for (int i=0; i