This type of murder-suicide has happened many, many times before, where a student super upset over being given a poor grade retaliates against their teacher and kills him.   And in some cases like this one, they then follow that up with committing suicide.

You cannot pass any kind of law to stop this sort of crime.  I guess that if college professors like this unfortunate man were to give all of their students an A grade, then this sort of thing would never, ever happen.     But that is obviously unrealistic and impossible to do.

http://laist.com/2016/06/01/ucla_shooting_victims_id.php