Question
Draw a sequence diagram to illustrate the operation of the change DVDs for the DVD player. The following describe the behaviors of a DVD player:
Draw a sequence diagram to illustrate the operation of the change DVDs for the DVD player. The following describe the behaviors of a DVD player:
- The DVD player is initially off. It can turned on or off by pressing the power button.
- When it is off, none of the other buttons do anything.
- When it is on, the tray can be opened or closed by pressing the eject button.
- When it is open, only the power and eject buttons will do anything.
- When the tray is closed, the motor is either spinning or stopped.
- When you turn on the power or close the tray, the machine first spins up the motor to read the disk. It then gets one of three signals:
- No disk it stops the motor, and disables all buttons other than eject and power
- Timeout, indicating it was unable to read the disk it stops the motor, displays an error message, and disables all buttons other than eject and power.
- Disk okay it stops the motor, but enables the play control buttons.
7- There are three play control buttons.
- Play starts the DVD playing, spinning up the motor if necessary.
- Pause toggles between playing and paused, without stopping the motor. Pause does nothing if pressed when the motor is stopped.
- Stop stops the motor, if it was spinning.
The sequence should start in the Playing state, and describe the scenario in which the user ejects the current disk, inserts a new one, and selects play again. Assume the DVD player software has to send signals to the motor (to tell it when to spin) and to the tray (to open and close), and in both cases needs to await confirmation from the device before doing anything else. Use activation bars to indicate when the devices are active. State any further assumptions you make.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started