/*************************** * @author: Stephen Hack * @version Lab 4 - Experimenting with I/O CS 239 January 22, 2006 Section 3. Dr. Harris. I have not given nor recieved any unauthorized help. *****************************/ Lab: Experimenting with Input/Output 3.3. What was the first error generated by the compiler? ___________________________________ Rooter.java:16: cannot find symbol symbol : class PrintWriter ___________________________________ 3.4. What line did you need to add? ____________________________ import java.io.PrintWriter; ____________________________ 3.6. What was the first error generated by the compiler this time? __________________________________ Rooter.java:18: cannot find symbol symbol : class Scanner __________________________________ 3.7. Fix this error. What line did you need to add? __________________________ import java.util.Scanner; __________________________ 4.4. Why was no output generated? ________________________________________ It the method was missing the command, Screen.flush(). The flush method is invoked to write any buffered output to the underlying stream. ______________________________________ 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? _______________________________________________________ You need to type control d to terminate the application normally. _______________________________________________________ 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? ___________________________________________ It printed Today's Date: 22 January 2007 Programming Assignment 1 Due Review the Java tutorial on Exceptions That happened because we typed a command prompt which looked within the assignments.txt file and printed out what was under file for January 22nd. ___________________________________________ 5.8 What changes did you need to make? I needed to add the statement _______________________________ dates = new File(args[0]); _______________________________ 5.10. What changes did you need to make? 5.12. What changes did you need to make? I needed to create an exception. _______________________________ try { dateScanner = new Scanner(dates); } catch (FileNotFoundException fnfe) { System.out.println("File not found."); } _______________________________ 5.14. What output was generated? 6.2. What changes did you need to make? 6.4. What output was generated?