Get Off My Elevator
- When the down button on the fourth floor is pressed, go to the fourth floor.
- If passengers are on board, wait for them to get off.
- If passengers on the fourth floor delay entering, it is because someone on the fifth floor has pressed the up button on the fifth floor.
- After visiting the fifth floor, the passengers on the fourth floor are still waiting, your button remains lit up because of this.
- Once the passenger from the fourth floor selects their destination, take them there.
- Once more, wait until passengers have exited before closing doors.
- Await the next passenger to select their desired floor, only open doors when you are on said floor, and only close doors when passengers have either exited or stayed on.
- Repeat this process with the appropriate floor numbers and in the order that the buttons on each floor have been pressed.
—I suppose this is one way to get the job done, Lobsterman, but if the building is 34 stories, you’d want to find a way to write a single instruction that would hold true for all “down button” requests, not 34 different sets of instructions.
—Are we to assume that the elevator knows whether it’s occupied? And how will the elevator judge whether a passenger has exited, or was never on in the first place, or changed her mind and wants to proceed without exiting? To be clear, the elevator couldn’t care less, nor should it ever be told to “wait” for anything. Give it instructions on what to do regardless of passengers.
—That may be true (and it echoes my personal experience, which I related in class), but it’s much too specific for a general set of instructions, AND the elevator could not care less (nor should it) about the reason for my declining to enter.
—You should be able to take it from here, Lobsterman. We’re not looking for a description of one person’s experiences with a particular elevator. We’re looking for a set of rules for your IDEAL READER (the elevator) to follow in all situations.