Simple grade calculator from a java tutorial