Implementation of a simple calculator