writeToFile() method added to QuizGameImpl

to save data to txt file.