Question: Write a static method named randomRightTriangles that calculates and displays the area of randomly-generated right-angled triangle. The base and height of each triangle should be

 Write a static method named randomRightTriangles that calculates and displays thearea of randomly-generated right-angled triangle. The base and height of each triangle

Write a static method named randomRightTriangles that calculates and displays the area of randomly-generated right-angled triangle. The base and height of each triangle should be a randomly generated integer between 1 and 10 inclusive. Your method should keep generating random right-angled triangles until a strictly increasing sequence of 3 areas is printed. In other words, if the last 3 right-angled triangles generated have areas of a1,a2 and a3 such that a1

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!