Computing area and perimeter with default point constructor as well as user defined constructor