The required definition for the
readData
method is as follows:
import java.io.*; public class Auxiliaries { public static Movie[] readData(Movie movies []) throws IOException { FileInputStream stream = new FileInputStream("input.data"); InputStreamReader reader = new InputStreamReader(stream); StreamTokenizer tokens = new StreamTokenizer(reader); int movieCounter = 0; while (tokens.nextToken() != tokens.TT_EOF) { int x = (int) tokens.nval; tokens.nextToken(); int y = (int) tokens.nval; tokens.nextToken(); int z = (int) tokens.nval; movies [movieCounter] = new Movie(x, y, z); ++movieCounter; } stream.close(); return movies; } }