# Don’t use loops

Posted: November 1st, 2022

Place your order now for a similar assignment and have exceptional work written by our team of experts, At affordable rates

Part 2. Rectangles and Points (Thinking)
Don’t Use LOOPS
This part of the assignment deals with the use of if statements and proper input. NO GRAPHICS REQUIRED.
Level 2: Define and assign a rectangle with a point and a length and width. Use this information to display the coordinates of all four vertices (corners) of the rectangle in the order shown to the right of ABCD. Note that length and width are always values greater than 0.
Again, NO GRAPHICS REQUIRED!!! AB and DC are length, BC and AD are width.
For example: The rectangle has vertices A(3, 5), B(20, 5), C(20, 26) and D(3, 26)
Level 3: Continue from level 2 to prompt the user to input a point (called P) with separate prompts for the x-coordinate and the y-coordinate. Determine if that point P lies on or within the rectangle.
For example:
The rectangle has vertices A(3, 5), B(20, 5), C(20, 26) and D(3, 26) Please enter the x coordinate of P. 8
Please enter the y coordinate of P. 12
(8, 12) is on or within the rectangle.
Level 3+: Level 3 is modified so that the point is inputted by the user in the form: (x,y).
For example:
The rectangle has vertices A(3, 5), B(20, 5), C(20, 26) and D(3, 26)
Please enter the point in the form (x, y): (8,12)
(8,12) lies on or within the rectangle.
Level 4-: A rectangle can be divided into four equal quadrants, as shown in the diagram to the right. To do this, the midpoints of the sides (F, G, H and I on the diagram) and M (midpoint of the rectangle itself) need to be found.
Continue from level 3+ and display F, G, H, I and M. Please use the diagram as a reference point, so F is the midpoint of AD, etc..
For example:
The rectangle has vertices A(3, 5), B(20, 5), C(20, 26) and D(3, 26)
Please enter the point in the form (x, y): (8,12)
(8,12) lies on or within the rectangle.
F(3, 15.5), G(11.5, 5), H(20, 15.5), I(11.5, 5), M(11.5, 15.5)
Level 4: Continue from level 4- so that if the point is on or inside the rectangle, the program now displays which quadrant it is in. Use the diagram as a guideline for the quadrants..
For example:
The rectangle has vertices A(3, 5), B(20, 5), C(20, 26) and D(3, 26)
Please enter the point in the form (x, y): (8,12)
(8, 12) lies on or within the rectangle.
F(3, 15.5), G(11.5, 5), H(20, 15.5), I(11.5, 5), M(11.5, 15.5)
(8, 12) lies within Quadrant 3.
Level 4+: Your program is to be efficient, make very good use of functions and perform error handling (i.e. handling invalid input with a clear error message).

### Expert paper writers are just a few clicks away

Place an order in 3 easy steps. Takes less than 5 mins.

## Calculate the price of your order

You will get a personal manager and a discount.
We'll send you the first draft for approval by at
Total price:
\$0.00