Changing triangle constructor and countPerimeter method