Square class can calc its perimeter
Refactored Square class with inheritance