Question: Develop a C# project which includes a class RightTriangle specified in the UML below: RightTriangle +SideA: property for sideA +SideB: property for sideB +Hypotenuse: property

Develop a C# project which includes a class RightTriangle specified in the UML below: RightTriangle +SideA: property for sideA +SideB: property for sideB +Hypotenuse: property for hypotenuse (ypoteuse +Area: property for area +Perimeter: property for perimeter sideA2+sideB*) + RightTriangle(): default constructor + RightTriangle(double, double: overloaded constructor +ToString): return a string containing the right triangle's two sides, hypotenuse, area and perimeter calculate(): calculate hypotenuse, area and perimeter based on the two sides Requirements: 1. Project has to be compiled, and the UML must be followed. If this requirement is not satisfied, you don't have any credit. 2. All properties shall have public get and set functions All properties' set functions shall calculate and update all necessary data 4. Default constructor shall set the values for sideA to be 1, and sideB to be 1 5. Overloaded constructor shall set sideA and sideB based on the input parameters' values 6. Both default constructor and overloaded constructor shall invoke the private calculate function to calculate the hypotenuse, area, and perimeter correctly. Both default constructor and overloaded constructor shall update the hypotenuse, area, and perimeter thru properties correctly. 7. 8. ToString) function shall be implemented correctly, i.e., return a string with the correct 9. calculate() function shall be implemented correctly, i.e., private, and with no parameters. info The driver shall: (must be executed in the sequence specified below) 10. Instantiate (create) a right triangle object rtl using the default constructor I l. Instantiate (create) a right triangle object rt2 using the overloaded constructor, with side equal to 3 and sideB equal to 4 12. Print out rt2's sideA, sideB, hypotenuse, area, and perimeter through properties 13. Change rtl's sideA and sideB to be 6 and 8, respectively, through properties 14. Display rt1's information using the ToString function
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
