Math Application written in java