KFury, I have replaced your human name with your Public Display Name for the purposes of naming this post. The point of HAVING a PDN is to shield your identity from your classmates and the wider world. We need to have a safe space for me to rudely (I mean mercilessly) (I mean candidly) critique your work without shaming you. Please change your Display Name.
—DSH
Instructions to an Elevator of a 5-floor hotel:
- Respond to any buttons Pressed on any floor
- When on that following floor open the doors for 15 seconds to wait for Passengers to enter
- If a Passenger interferes with the doors closing begin another 15-second timer before closing again
- If there are no presses on any of the corresponding buttons in the 15-second time frame close the doors and wait for a response from either the current or a different floor.
- If the Passenger presses one button Respond to the following floor
- If the Passenger presses two or more buttons on the 5th floor go to the nearest floor that was Pressed until each floor is visited
- If the passenger presses two or more buttons on the 4th floor go to the nearest floor UP first before proceeding to the floors that were selected DOWN.
- If the passenger presses two or more buttons on the 3rd floor go to the nearest floor UP first before proceeding to the floors that were selected DOWN.
- If the passenger presses two or more buttons on the second floor go to the nearest floor DOWN first before proceeding to the floors that were selected UP.
- If the Passenger presses two or more buttons on the 1st floor go to the nearest floor that was Pressed until each floor is visited
- If a Passenger presses a button on a floor en route to the floor Passengers already in the elevator selected, respond to the Passenger outside the elevator for pick up.
- If a Passenger presses a button on the 5th floor while there are Passengers already in the elevator below, respond to the selected floor to those in the elevator first before proceeding to the selected one above.
- If a Passenger presses a button on the 4th floor while there are Passengers already in the elevator on a floor BELOW, respond to the selected floor to those in the elevator first before proceeding to the selected one above.
- If a Passenger presses a button on the 4th floor while there are Passengers already in the elevator on the floor ABOVE, respond to the button on the 4th floor to pick the Passengers up.
- If a Passenger presses a button on the 3rd floor while there are Passengers already in the elevator on a floor BELOW, respond to the selected floor to those in the elevator first before proceeding to the selected one above.
- If a Passenger presses a button on the 3rd floor while there are Passengers already in the elevator on the floor ABOVE, respond to the button on the 3rd floor to pick the Passengers up.
- If a Passenger presses a button on the 2nd floor while there are Passengers already in the elevator on a floor BELOW, respond to the selected floor to those in the elevator first before proceeding to the selected one ABOVE.
- If a Passenger presses a button on the 2nd floor while there are Passengers already in the elevator on the floor ABOVE, respond to the button on the 2nd floor to pick the Passengers up.
- If a Passenger presses a button on the 1st floor while there are Passengers already in the elevator, respond to the selected floor to those in the elevator first before proceeding to the selected one BELOW.
- When all Responses are completed wait at the following floor that was requested by the Passenger.
You must be logged in to post a comment.