After generating rectangles of arbitrary size on a two-dimensional plane, write a program to find the following and show the result. (1) Structure rectangle member composition: center position (x,y), width, height (2) Existence range of rectangle: 0 to 100 in x and y directions (3) Rectangle size: 20≤w,h≤50 (4) Write a program that randomly generates 10 squares and finds Intersection over Union (IoU) between different squares. (Let the two squares be A and B, IoU(A, B) = ?∩?/?∪?) (5) Write the following functions: (a) A function that fills the contents of the structure (b) A function that calculates the IoU of two given rectangles (c) A function that displays the contents of the final structure (d) Other functions necessary for writing programs (6) IoU results between squares are output in the form of 10 X 10 C++ Program source (submit only .c or .cpp)

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question
1. After generating rectangles of arbitrary size on a two-dimensional plane, write a program to find the following and show the result. (1) Structure rectangle member composition: center position (x,y), width, height (2) Existence range of rectangle: 0 to 100 in x and y directions (3) Rectangle size: 20≤w,h≤50 (4) Write a program that randomly generates 10 squares and finds Intersection over Union (IoU) between different squares. (Let the two squares be A and B, IoU(A, B) = ?∩?/?∪?) (5) Write the following functions: (a) A function that fills the contents of the structure (b) A function that calculates the IoU of two given rectangles (c) A function that displays the contents of the final structure (d) Other functions necessary for writing programs (6) IoU results between squares are output in the form of 10 X 10 C++ Program source (submit only .c or .cpp)
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
User Defined DataType
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education