Essay
Programming
Write a static method named randomRects that calculates and displays the area of randomly-generated rectangles. The width and height of each rectangle should be a randomly generated integer between 1 and 10 inclusive. Your method should keep generating random rectangles until an increasing sequence of four areas is printed. In other words, if the last four rectangles generated have areas of a1, a2, a3 and a4 such that a1 < a2 < a3 < a4, the method should print the final message and stop. So your method will generate at least 4 total rectangles but possibly many more, stopping only when it sees 4 in a row with areas in increasing order.
The following calls demonstrate your method's behavior. Your method should match this output format exactly:
Correct Answer:

Verified
(three solutions shown)
public static vo...View Answer
Unlock this answer now
Get Access to more Verified Answers free of charge
Correct Answer:
Verified
public static vo...
View Answer
Unlock this answer now
Get Access to more Verified Answers free of charge
Q1: While Loop Simulation<br>For each call below
Q2: Programming<br>Write a static method named graduation
Q3: Parameter Mystery<br>At the bottom of the page,
Q4: Assertions<br>For each of the five points
Q6: Expressions<br>For each expression in the left-hand
Q7: Programming<br>Write a static method named cheerleader that
Q8: If/Else Simulation<br>For each call below to