chapter 4 exercises: rewrite Student_info struct

calculate final grade for a student immediately after homework grades
are read