else part contains only another if statement.
If you use indentation for the else part, it isn't
easy to see that these are really a series of tests which
are similar. It is better to write them at the same indentation
level by writing the if on the same line
as the else.
if (score < 35)
g.setColor(Color.magenta);
else
if (score < 50)
g.setColor(Color.red);
else
if (score < 60)
g.setColor(Color.orange);
else
if (score < 80)
g.setColor(Color.yellow);
else
g.setColor(Color.green);
if
immediately after the else. This is a common
exception to the indenting rules, because it results in much more
readable programs:
if (score < 35) g.setColor(Color.magenta); else if (score < 50) g.setColor(Color.red); else if (score < 60) g.setColor(Color.orange); else if (score < 80) g.setColor(Color.yellow); else g.setColor(Color.green);