import java.io.*; public class Lab2 { /* edit and compile this, then run the program using the command line java Lab2 filename.obj filename.dat where filename.obj is the name of your object file and filename.dat is the name of your binary file */ public static void main(String[] args) { // get first command line parameter and open object file for input try { // in a loop until EOF, read objects, characterize them, and process them } catch (EOFException e) { // handle the EOFException by closing the input file } catch (Exception e) { /* handle any other type of Exception that might occur ClassNotFoundException, InvalidClassException, StreamCorruptedException, OptionalDataException, IOException ... call System.exit() ??? */ } // output your results (be sure your processing variables are "in scope") // get second command line parameter and open binary file for input try { // in a loop until EOF, read doubles and process them } catch (EOFException e) { // handle the EOFException by closing the file } catch (IOException e) { // handle any other type of IOException ... call System.exit() ??? } // output your results // reopen the binary file for input try { // in a loop until EOF, read ints and process them } catch (EOFException e) { // handle the EOFException by closing the file } catch (IOException e) { // handle any other type of IOException ... call System.exit() ??? } // output your results } }