It's a example.Perhaps this example teaches the reader the application of the key word"if... else if...else". I think so.