Using Descriptive Narrative to Identify Use Cases and Creating Class Diagrams
1. Brainstorming the Narrative Through Nouns and Verbs
A Microwave oven is an electric appliance for cooking or heating the food quickly in the kitchen. The process begins with the door opening on the microwave and placing of foods on the turntable. The user then closes the door for safe operation of the microwave. The user then inputs the desired cooking time on the keypad, or clicks on one of the cooking presets on the control panel (Dennis et al., 2023).
The user can also select a power setting based on food to be heated. After the user selects an option in the predefined options in the microwave, the microwave starts to emit microwaves which in turn starts heating the food. The turntable is used to evenly heat the food during the operation. This can be seen on display screen and inside light can be used to look at food through door window to show how much time is left on the cooking cycle.
The user can stop the cooking operation by pressing Pause button or by opening the door, if necessary. Further, when the Stop or Clear button is pressed the user can cancel the operation. Once the time set for cooking the food is over, the microwave stops cooking, the turntable stops rotating while the buzzer produces a sound which suggests that the food is ready (Satzinger et al., 2022). Also the microwave should stop working immediately after the user opens the door for safety reasons.
2. Principal Use Cases
The following use cases are taken from the verbs and noun-verb combinations identified in the narrative reflecting the major interactions between the User actor and the microwave system as confirmed by the microwaves story (Dennis et al., 2023). The primary use cases include:
1. Open Door
2. Place Food
3. Close Door
4. Set Power Level
5. Set Cooking Time
6. Start Cooking,
7. Pause Cooking,
8. Cancel Cooking,
9. Monitor Cooking Progress,
10. Alert User on Completion
11. Remove Food.
3A. Identification of a list of classes that are important and have play a role in the device
Based on the narrative the key classes that have a role to play in the microwave include;
Ø MicrowaveOven
Ø User
Ø Door
Ø ControlPanel
Ø Keypad
Ø Display
Ø Timer
Ø Magnetron
Ø Turntable
Ø SafetyInterlock
Ø Buzzer
Ø InteriorLight
3B. Objects required to work together for the functionality of the device
The Control Panel cooperates with the Keypad and Display to obtain inputs from the user and give immediate visual feedback to the user. The Microwave Oven precisely synchronizes all of the heating cycle with the Magnetron, Turntable, Timer and the Safety Interlock. When activated by the Timer the Display will update the timer display real-time, and set the Buzzer active once the cooking time has elapsed. Some of these object collaborations, when combined together, enable the safe and effective operation of the microwave oven (Object Management Group, 2024).
3C & 3D. Responsibilities of the devices in a set of cards
Class: MicrowaveOven
Class: Door
Responsibilities
Collaborators
Responsibilities
Collaborators
‣ Control the entire heating cycle
Door
‣ Allow or restrict access to the cavity
SafetyInterlock
‣ Managing power distribution to sub systems
Magnetron
‣ Detecting and reporting open or closed state
MicrowaveOven
‣ Enforcing safety rules during operations
Timer
‣ Trigger the safetyinterlock on open
SafetyInterlock
Class: ControlPanel
Class: Timer
Responsibilities
Collaborators
Responsibilities
Collaborators
‣ Receive and validate user’s input
Keypad
‣ Store and count cooking duration
Display
‣ Relay commands to the oven system
Display
‣ Signal the system when time expires
Buzzer
‣ Display current settings to the user
Timer
‣ Support pause and resume operations
MicrowaveOven
Class: Magnetron
Class: SafetyInterlock
Responsibilities
Collaborators
Responsibilities
Collaborators
‣ Generate microwave radiation at higher frequencies
MicrowaveOven
‣ identifying the state of the door
Door
‣ Adjust output based on the power level
PowerLevel
‣ Block magnetron operation when door is open
Magnetron
‣ Shut down when door opens or time ends
SafetyInterlock
‣ Restore power once door is confirmed closed
MicrowaveOven
References
Dennis, A., Wixom, B. H., & Tegarden, D. (2023). Systems analysis and design: An object-oriented approach with UML (7th ed.). Wiley.
Object Management Group. (2024). Unified Modeling Language (UML) version 2.5.1 specification. https://www.omg.org/spec/UML
Satzinger, J. W., Jackson, R. B., & Burd, S. D. (2022). Systems analysis and design in a changing world (8th ed.). Cengage Learning.