MODIFIED resultcalculator.java