:1. Include a block comment at the top of your program (before preprocessor directives) that contains: The
Question:
:1. Include a block comment at the top of your program (before preprocessor directives) that contains: The assignment number, your name, and the program due date 2. Comment variable declarations, and assignment where not obvious. In general, make use of comments throughout your code to describe your logic 3. Use appropriate variable names throughout your
program You are working with a team to design the floorplan of a museum display. The display is held in a room that is 20 x 20 meters, has a triangular exit area, and five current items. The items and exit are in the following locations (x, y locations given in meters; a diagram is provided on the next page for reference): 1. Exit Area: Starts at (5, 20) and ends at (15, 20) 2. Item 1: (0, 15) 3. Item 2: (5,5) 4. Item 3: (10, 10) 5. Item 4: (15,5) 6. Item 5: (20, 10) There is one last item left to place in the display (the sixth item total). Your team must determine if the proposed locations meet the placement criteria. The criteria are as follows (see the diagram for a visualization): 1. The item must be more than 2.5m away from any of the existing items in the display 2. The item must be outside of triangular exit area that is 5m tall 3. The item must be placed inside of the 20 x 20 meter room In a single .c file, write the code the complete the following tasks. It is up to you to declare the appropriate variables: a.
1. Prompt the user to input the proposed x and y location of the final item y 2. Re-prompt the user to input the x and y location if either value is below 0 or above 20 3. Determine if the final item is or is not allowed to be placed in the proposed location: If the final item can be placed in the proposed location, print The proposed location is allowed to the screen b. If the final item cannot be placed in the proposed location, determine which item the proposed location is too close to, if the proposed location is too close to the exit, or if the object is outside of the room: i. Print to the screen The proposed location is not allowed. It is too close to XX where XX is the item/exit that the proposed location is too close to, or The proposed location is not allowed. It is outside of the room NOTE: The equation for a circle is (x h)2 + (y - k)2 = r2 where (h, k) is the location of the center of the circle and r is the radius Test Cases: x = 10, y = 16; The proposed location is not allowed. It is too close to the Exit Area x = 11, y = 11; The proposed location is not allowed. It is too close to Item 3 x = 20, y = 20; The proposed location is not allowed. It is outside of the room x = 3, y = 8; The proposed location is allowed Diagram: Exit Area: 10 m long (0, 20) (5, 20) (15, 20) |(0, 15) (10,15) (10, 10) (20, 10) (5,5) (15,5) (20,0) (0,0)