DESIGN: Calculate final marks for a student and write to an output file