/** * Problem states that there are exactly 10 salespeople. We will read in this * data from a file called salespeople.txt */ import java.io.*; import java.util.Scanner; public class CarDealer { 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 = 10; String[] names = new String[SIZE]; int[] carsSold = new int[SIZE]; populateArrays(infile, names, carsSold); printArrays(names, carsSold); // 1. total System.out.println("sum of all cars sold is: " + sum(carsSold)); // 2. max int index = maximum(carsSold); for (int i=0; i