Completed the methods to write and read from file (opdracht and quiz)