Lab: Experimenting with Input/Output


Name:                              Email:                   JAC#:


Part 1. Using the Java APIs





1.3. 
    What was the first error generated by the compiler?







1.4. 
    Fix this error.  What line did you need to add?







1.6. 
    What was the first error generated by the compiler this time?







1.7. 
    Fix this problem.  What line did you add?




Part 2. Keyboard Input and Screen Output





2.4. 
    Why was no output generated?







2.5. 
    Fix this mistake.  What line did you add?







2.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?  (Hint: Search
    on the WWW for the phrase "send stream end in a terminal" and find a
    reputable site.)







2.7. 
    Why does this application terminate when you type the end-of-stream
    character?    




Part 3. File Input Basics





3.4. 
    What output was generated?

    





3.6. 
    What happened and why?

    





3.7. 
    Add a declaration of a File variable named
    dates to main().
    What change(s) did you make?

    





3.8. 
    Instantiate the variable named dates passing
    the constructor command-line argument 0. 
    What change(s) did you make?

    





3.9. 
    Modify main() so that dateScanner
    uses dates and the application will compile and execute
    properly.
    What changes did you need to make?

    





3.11. 
    What output was generated?

    


Part 4. More on File Input





4.1. 
    Modify main() so that it will process multiple files
    when their names are passed-in as command-line arguments.
    What changes did you need to make?

    





4.3. 
    What output was generated?

    


Part 5. Programming Practice After the Lab


Part 6. Questions to Think About