![]() |
Objectives: |
Students will:
|
Background: |
Much data processing uses files rather than hand entry. Today's lab will use file IO to read data from a file, use that data to create a TextAnalyzer object, and then write the results of the analysis of the data to a new output file. |
New Classes: |
File - An abstract representation of a File. PrintWriter - Outputs data. It contains familiar methods like print, println, and printf. Scanner - While not new, it will be used in a new way. |
Materials: |
FileIO.java small.txt gettysburg.txt |
Acknowledgment: |
Written by Nancy Harris |
Test your program. Check that the output file looks like this one. out.txt.
Updated 02/09/2014 (nlh)