Simple abstract class for Java Calculators