Question: Exercise 2 . 3 Write a class called RightTriangle that will store the possible lengths of the three sides of a right triangle. The class
Exercise
Write a class called RightTriangle that will store the possible lengths of the three sides of a right triangle. The class has a method called isRightTriangle that will return true if the three sides make a right triangle. Otherwise, return false. The toString method should display the three numbers and whether they make a right triangle.
Add a class called RightTriangleTest with the main method that will prompt the user to enter three integers, one at a time, for the possible lengths of the three sides of a right triangle. Create an object of the RightTriangle class and print the object. Design the UML class diagram before you code.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
