Assignment 4

4.1

Write a program that creates two files, one text and the other byte-stream, each of which contains the following data:

You have to decide the data format.
4.2
Write a program to copy the files created in 4.1. For the byte-stream file, write two methods, one reading it byte-by-byte and the other reading it data-by-data.
4.3
Write a program to read a roster and report the ranking for each of the students. A roster consists of lines of records, each of which consists of a name and a grade separated by at least one space. For example,

     harrow    91
     weiss     100
     tenenbaum 91
     whitlock  92
     gladys    90
the output should be

     Name      Grade    Ranking
     ==========================
     harrow    91       3
     weiss     100      1
     tenenbaum 91       3
     whitlock  92       2
     gladys    90       5
4.4
Write a program that checks the spelling of all words in a file. It should read each word of a file and check whether it is contained in the word list.