An expert calculator in Java