CS 1054: Lab 7

Lab meeting 7: File I/O Example

Note

For this lab you can work with a partner.

Aim

The main aim of this lab is to introduce you to the concept of FileReaders and Writers, main method, StringTokenizer and how to convert a String to an 'int'.  The class documents can be found at http://java.sun.com/j2se/1.5.0/docs/api/

 

List of tasks

For this lab you will implement just one class: Multiplicator. It will have just one main method. I will let you decide what code to put in the main method. The method will use a file reader to read from a file input.txt, will read each line and multiply both the numbers, and write the result to another file output.txt. Please refer to class notes on what classes to use, and how to use these.

Please document your code.

Absolutely Necessary!


© Mir Farooq Ali 2003.