ios Calculator as per CS193P stanford courseware