(The Triangle class)
Design a class named Triangle that extends the GeometricObjectclass. The Triangle class contains:
– Three float data fields named side1, side2, and side3 todenote the three sides of the triangle.
– A constructor that creates a triangle with the specified side1,side2, and side3 with default values 1.0.
– The accessor methods for all three data fields.
– A method named getArea() that returns the area of thistriangle.
– A method named getPerimeter() that returns the perimeter of thistriangle.
– A method named __str__() that returns a string description forthe triangle.
For the formula to compute the area of a triangle, see Exercise2.14. The __str__() method
OR
OR