Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Students: Section 4 . 2 2 is a part of 1 assignment: Lab 2 : Geometry Pt 2 Includes: zyLab No due date 4 .

Students:
Section 4.22 is a part of 1 assignment: Lab 2: Geometry Pt2
Includes: zyLab
No due date
4.22 Geometry Part 2
Create the design for determining if a point is inside, on, or outside of the rectangle. Drawing out the rectangle and labeling the coordinates of all points will help you to visualize the problem.
Once the de n has been completed, write a program that prompts the user for the x and y coordinates for the lower left hand corner of a rectangle as ..ell as the height and the width of the rectangle. After that, you will need to get the coordinates for the point from the user as well. Once all inputs have been entered by the user, determine if the point is inside the rectangle, on the rectangle, or outside the rectangle. If the point is inside the rectangle, print "Inside the rectangle". If the point is on the rectangle, print "On the rectangle". If the point is outside of the rectangle, print "Outside the rectangle".
Sample Execution:
Enter the x coordinate for the lower left corner of the rectangle: 1
Enter the y coordinate for the lower left corner of the rectangle: 1
Enter the width of the rectangle: 5
Enter the height of the rectangle: 3
Enter the x coordinate of the point: 2
Enter the y coordinate of the point: 1
on the rectangle
The first 3 tests are worth 20 noints each. Thevtest for the ooint being in the rectanole on the rectanale and Artside the rectanole The
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle Database 11g SQL

Authors: Jason Price

1st Edition

0071498508, 978-0071498500

More Books

Students also viewed these Databases questions

Question

What is the purpose of the standard deduction for individuals?

Answered: 1 week ago