Solve the problem in C++ (Geometry: find the bounding rectangle) A bounding rectangle is the minimum rectangle that encloses a set of points in a two-dimensional plane, as shown in Figure 11.9d. Write a function that returns a bounding rectangle for a set of points in a two-dimensional plane, as follows: const int SIZE = 2; Rectangle2D getRectangle(const double points[][SIZE]); Write another function that returns a pointer to the bounding rectangle as follows: Rectangle2D* getRectanglePointer(const double points[][SIZE]); The Rectangle2D class is defined in Programming Exercise 11.9. Write a test program that prompts the user to enter five points and displays the bounding rectangle’s center, width, and height. Sample Run Enter five points: 1.0 2.5 3 4 5 6 7 8 9 10 The bounding rectangle’s center (5.0, 6.25), width 8.0, height 7.5
Solve the problem in C++
(Geometry: find the bounding rectangle)
A bounding rectangle is the minimum rectangle that encloses a set of points in a two-dimensional plane, as shown in Figure 11.9d.
Write a function that returns a bounding rectangle for a set of points in a two-dimensional plane, as follows:
const int SIZE = 2;
Rectangle2D getRectangle(const double points[][SIZE]);
Write another function that returns a pointer to the bounding rectangle as follows:
Rectangle2D* getRectanglePointer(const double points[][SIZE]);
The Rectangle2D class is defined in
Write a test program that prompts the user to enter five points and displays the bounding rectangle’s center, width, and height.
Sample Run
Enter five points: 1.0 2.5 3 4 5 6 7 8 9 10
The bounding rectangle’s center (5.0, 6.25), width 8.0, height 7.5
![](/static/compass_v2/shared-icons/check-mark.png)
Trending now
This is a popular solution!
Step by step
Solved in 4 steps with 3 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
![C How to Program (8th Edition)](https://www.bartleby.com/isbn_cover_images/9780133976892/9780133976892_smallCoverImage.gif)
![Database Systems: Design, Implementation, & Manag…](https://www.bartleby.com/isbn_cover_images/9781337627900/9781337627900_smallCoverImage.gif)
![Programmable Logic Controllers](https://www.bartleby.com/isbn_cover_images/9780073373843/9780073373843_smallCoverImage.gif)