Danny Ziemer Section 1 1-22-07 Lab 4 Lab: Experimenting with Input/Output 3.3. What was the first error generated by the compiler? cannot find symbol. it couldn't find PrintWriter. 3.4. What line did you need to add? import java.io.*; 3.6. What was the first error generated by the compiler this time? cannot find symbol. it couldn't find Scanner. 3.7. Fix this error. What line did you need to add? import java.util.Scanner; 4.4. Why was no output generated? The stream needed to be flushed. 4.5. Fix this mistake. What line did you add? screen.flush(); 4.6. What do you need to type in the terminal window (as a response to the prompt) in order to make this application terminate normally? ctrl z 5.4. What output was generated? Today's Date: 22 January 2007 Birthday: Sir Francis Bacon Birthday: George Foreman 5.6. What happened and why? The system cannot find the file specified. Because there is no such text file. 5.8 What changes did you need to make? File dates; 5.10. What changes did you need to make? dates = new File(args[0]); 5.12. What changes did you need to make? try { dateScanner = new Scanner(dates); } catch(FileNotFoundException fnfe) { screen.println(fnfe.getMessage()); } Otherwise, There might be a file not found exception which would cause the program to crash. 5.14. What output was generated? Today's Date: 22 January 2007 Birthday: Sir Francis Bacon Birthday: George Foreman 6.2. What changes did you need to make? for(int count = 0; count < args.length; count++) { dates = new File(args[count]); .... } Had to put the dates instantiation plus the try catch into a for loop so that it changed what file that the Scanner was reading from and could get the needed data. 6.4. What output was generated? Today's Date: 22 January 2007 Birthday: Sir Francis Bacon Birthday: George Foreman Programming Assignment 1 Due Review the Java tutorial on Exceptions If the date would have been 1-23 then no assignments would have come up.