Finished. Works perfectly.

Need to provide the extension for gradesIn.txt and gradesOut.txt for it
to work properly.