Question: Problem 4: 1. Design a class named Triangle whose sides are integers. 2. Sides are named side1, side2, side3. 3. Create a default constructor which
Problem 4: 1. Design a class named Triangle whose sides are integers. 2. Sides are named side1, side2, side3. 3. Create a default constructor which initialize each side with 0. 4. Create a contractor with three parameters which will initialize each side with given value to constructor. 5. Write a function that returns the largest side. 6. Write a function that check if each side of Triangle is equal or not. 7. Write a function that calculate area of Triangle. 8. Create two objects of class Triangle in main. 9. Call all functions created in class for both objects. 10.Check if both Triangles are equal or not and print result.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
