Consider the following UML class design for elevator operation. Produce a sequence diagram for the scenario where a user requests to move to a different floor. Assume user is inside the elevator. Elevator -Direction: Boolean -Current floor: Integer -Idle: Boolean +Move() +Stop() +Change status() 1 communicates 1 Central Control System controls Door -Closed: Boolean +Select direction() +Control current floor() +Open() +Close() Internal Button -Floor number: Integer 1 communicates n Button -Lighted: Boolean -Pushed: Boolean +Switch the light() External Button
Added by Nancy G.
Close
Step 1
The user pushes the external button to request a different floor. Show more…
Show all steps
Your feedback will help us improve your experience
Patina Herring and 64 other AP CS educators are ready to help you.
Ask a new question
Labs
Want to see this concept in action?
Explore this concept interactively to see how it behaves as you change inputs.
Key Concepts
Recommended Videos
For each elevator, there are: - A set of elevator buttons. A user presses a button to select a destination. - A corresponding set of elevator lamps. Indicate the floors to be visited by the elevator. - An elevator motor. Controlled by commands to move up, move down, and stop. - A set of elevator doors. Controlled by commands to open and close a door. For each floor, there are: - Up and down floor buttons. A user presses a button to request an elevator. - A corresponding pair of floor lamps. Indicate the directions that have been requested. At each floor, and for each elevator, there is a pair of direction lamps to indicate whether an arriving elevator is heading in the up or down direction. For the top and bottom floors, there is only one floor button, one floor lamp, and (for each elevator) one direction lamp. There is also an arrival sensor at each floor in each elevator shaft to detect the arrival of an elevator at the floor. The hardware characteristics of the I/O devices are that the elevator buttons, floor buttons, and arrival sensors are asynchronous; that is, an interrupt is generated when there is an input from one of these devices. The other I/O devices are all passive. The elevator and floor lamps are switched on by the hardware, but must be switched off by the software. The direction lamps are switched on and off by the software.
Supreeta N.
Recommended Textbooks
Computer Science and Information Technology
Introduction to Programming Using Python
Computer Science - An Overview
Watch the video solution with this free unlock.
EMAIL
PASSWORD