Question: Someone please help. I'm new to programming and I don't know how to do this A two-story building uses a simple elevator to carry its
A two-story building uses a simple elevator to carry its tenants. A switch is located on each floor to call the elevator: t switch on the first floor and switch on the second floor. Two switches are available inside the elevator; one to go to the first floor (D button) and the other to go to the second floor button). No other facilities such as emergency stop, "open door close door etc. are supported by the elevator. A flowchart for the control of the elevator is attached. Work to do and document to submit: 1. verify that the flowchart is unstructured by identifying the parts of the flowchart that cannot be reduced to a rectangle. 2. Transform the flowchart so that it is structured and maintains the same flow oflogic as the unstructured flowchart. (Use Visio to draw the transformed flowchart) 3. Translate the structured flowchart into pseudocodes. Legends for the flowchart: 1. safely close door: A set of instructions (not shown to close the door safely. It will check to see if there is an obstruction (people, luggage, etc.) at the door way before closing the door The door will remain open if there is an obstruction. Similar set of instructions for the sliding door have been discussed in class 2. Floor 1 calls: Someone on the first floor calls the elevator; that is, someone pushes the t button on the first floor 3. Floor 2 calls: Someone on the second floor calls the elevator; that is, someone pushes the t button on the second floor 4, 1' button pressed: Someone inside the elevator wants to go to the first floor; that is someone pushes the D button inside the elevator. 5. 2nd button pressed: Someone inside the elevator wants to go to the second floor; that is someone pushes the 2 button inside the elevator A two-story building uses a simple elevator to carry its tenants. A switch is located on each floor to call the elevator: t switch on the first floor and switch on the second floor. Two switches are available inside the elevator; one to go to the first floor (D button) and the other to go to the second floor button). No other facilities such as emergency stop, "open door close door etc. are supported by the elevator. A flowchart for the control of the elevator is attached. Work to do and document to submit: 1. verify that the flowchart is unstructured by identifying the parts of the flowchart that cannot be reduced to a rectangle. 2. Transform the flowchart so that it is structured and maintains the same flow oflogic as the unstructured flowchart. (Use Visio to draw the transformed flowchart) 3. Translate the structured flowchart into pseudocodes. Legends for the flowchart: 1. safely close door: A set of instructions (not shown to close the door safely. It will check to see if there is an obstruction (people, luggage, etc.) at the door way before closing the door The door will remain open if there is an obstruction. Similar set of instructions for the sliding door have been discussed in class 2. Floor 1 calls: Someone on the first floor calls the elevator; that is, someone pushes the t button on the first floor 3. Floor 2 calls: Someone on the second floor calls the elevator; that is, someone pushes the t button on the second floor 4, 1' button pressed: Someone inside the elevator wants to go to the first floor; that is someone pushes the D button inside the elevator. 5. 2nd button pressed: Someone inside the elevator wants to go to the second floor; that is someone pushes the 2 button inside the elevator
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
