Question: 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

 Create the design for determining if a point is inside; on,

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 design has been completed, write a program that prompts the user for the x and y coordinates for the lower left hand comer of a rectangle as well 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 lover left corner of the rectangle: 1 Enter the y eoordinate for the lower left corner of the rectangle: 1 Enter the width of the rectangle: 5 Bnter the height of the rectangle: 3 Rnter the x coorainate of the point: 2 Enter the y coordinate of the point: On the rectang 2 e The first 3 tests are woth 20 points each. They tent for the point being in the rectangle, on the rectangle, and outside the rectangle The next 3 tests are worth 10 points each. They also test for a point being in the rectangle, on the rectangle, and outside the rectangle, but with different points for the rectangle and dilferent coordinates for the point. The last test worth 10 points, tests for correct white space and capitalzation, but the other tests do not

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!