Question: A bounding rectangle is the minimum rectangle that encloses a set of points in a two-dimensional plane, as shown in Figure 10.24d. Write a method
A bounding rectangle is the minimum rectangle that encloses a set of points in a two-dimensional plane, as shown in Figure 10.24d. Write a method that returns a bounding rectangle for a set of points in a two-dimensional plane, as follows:
public static MyRectangle2D getRectangle(double[][] points)
The Rectangle2D class is defined in Programming Exercise 10.13. Write a test program that prompts the user to enter five points and displays the bounding rectangle’s center, width, and height.

Enter five points: 1.0 2.5 3 4 5 6 7 8 9 10 JEnter The bounding rectangle's center (5.0, 6.25), width 8.0, height 7.5
Step by Step Solution
3.46 Rating (162 Votes )
There are 3 Steps involved in it
import javautilScanner public class Exercise1015 public static void mainString args double points ne... View full answer
Get step-by-step solutions from verified subject matter experts
