Update calculateClass.java

Code reviewed