Assignment #5 - File I/O


You will have two programs to write; one will employ a text file for input, the other a binary file. The text file will have String representations of ints, that is, the file should look like the following:

22
33
-34
109
0
-89
4

The binary file will also contain only ints , but this time in binary. For each assignment (let's call it part A for the text file, and part B for the binary file), you are to read the file and output three statistics:
    - the largest number encountered
    - the smallest number encountered
    - the average of all the numbers in the file (this should  be a double)

You must also create your own data files using the data I have provided above! For the text file, this is easy. just use a text editor (but not a word processor). For the binary file, you will have to write your own Java program to write the numbers into a file! Your programs should make NO assumptions about the data in the input file other than the files contains integers.