Skip to content
Snippets Groups Projects
Commit e86532e8 authored by HudeyfaA's avatar HudeyfaA
Browse files

Read me docs

parent a5ad5249
No related branches found
No related tags found
No related merge requests found
Pipeline #269595 failed
## Microwave Oven Project README ## Microwave Oven Project README
### Overview ### A new class diagram describing the final testable design after you have added all features
This document provides an overview of the latest changes and additions to the Microwave Oven project, including class diagrams, sequence diagrams, state transition diagrams (STM), and integration testing details. There have been added 3 new buttons, IncreaseTimerEvent, DecreaseTimerEvent and SecondButton. The first two are functions that are able to increase or decrease the time it takes to cook while it is cooking. The last button is a button that can increase the seconds of the clock, for more finite control.
### Class Diagram
A new class called "PlaySound" has been added. This class is responsible for playing a sound when the microwave timer reaches 0. The class diagram reflects this addition, along with the existing classes and their relationships.
### Sequence Diagrams ### Sequence Diagrams
New sequence diagrams have been added to describe the behavior of the three new features: Buzzer, PowerTube, and Add Second Timer. These diagrams illustrate the interactions between objects and methods to achieve the desired functionality. New sequence diagrams have been added to describe the behavior of the three new features: Buzzer, PowerTube, and Add Second Timer. These diagrams illustrate the interactions between objects and methods to achieve the desired functionality.
### State Transition Diagram (STM) ### Relevant new sequence diagrams describing each new feature
The STM for the UserInterface class has been updated to incorporate the new features. Specifically, the IncreaseTimerEvent and DecreaseTimerEvent can now be triggered while the microwave is in the "cooking" state. Additionally, the "Set Time" state now includes functionality for increasing the timer by seconds.
### Feature Descriptions The sequence diagram can be seen in the image folder. We have included the new features such as buzzer, power tube, timer, and add seconds timer:
- **Buzzer**: Implemented using the PlaySync function in C#, the buzzer produces a beeping sound when the timer reaches 0, simulating a real microwave's behavior. - **Buzzer**: Implemented using the PlaySync function in C#, the buzzer produces a beeping sound when the timer reaches 0, simulating a real microwave's behavior.
- **PowerTube**: The power can now be set within a range of 400W to 1200W during PowerTube instantiation. The power button has been removed from the user interface, and the power can only be set once. - **PowerTube**: The power can now be set within a range of 400W to 1200W during PowerTube instantiation. The power button has been removed from the user interface, and the power can only be set once.
- **Timer**: New functionalities allow users to increase and decrease the timer while it's counting down. Tests have been conducted to ensure these functionalities work as expected. - **Timer**: New functionalities allow users to increase and decrease the timer while it's counting down. Tests have been conducted to ensure these functionalities work as expected.
- **Add Second Timer**: A new button has been added to add 10 seconds to the timer. The timer calculation and display have been updated accordingly, with additional testing conducted to verify the functionality. - **Add Second Timer**: A new button has been added to add 10 seconds to the timer. The timer calculation and display have been updated accordingly, with additional testing conducted to verify the functionality.
### Integration Testing
A top-down integration testing approach has been chosen, focusing on the UserInterface class first as most new features directly affect it. Integration testing details, including a dependency tree and integration plan, are provided in the image folder. ### A new STM diagram for the UserInterface class, describing the final result after you have added all features
Our STM for the user interface of the microwave oven starts off by being ready. The user then closes the door and starts the timer, which then leads to the microwave cooking. The user can either increase or decrease the counting timer, open the door which finishes the session, or press the cancel cooking button, which all leads back to the microwave being ready for use again.
### A short description of what has been changed and what has been added in relation to the diagrams (you don’t have to explain why)
In the class diagram a new class called “PlaySound” has been added. In the STM a the IncreaseTimerEvent and DecreaseTimerEvent is able to be called while in the “cooking” state. Increase Seconds has also been added to the “Set Time” state. The ability to change the power output has been removed and can only be set in the constructor of the Powertube. The method PlaySoundAsync is called when the state goes from cooking to Ready.
### A short description of your decisions for the individual features
- **Buzzer**: For the buzzer i decided to use a windows c# function called PlaySync which lets me play a short sound, The implementation was made this way to make it as realistic as possible to a real microwave.
**PowerTube**: To implement this feature, I added the power to the list of arguments in the constructor. If the power is outside the range of 400 to 1200, it defaults to 700W, the previous max power. I then removed power as an argument from the turn on method. Any other part of the system that created a PowerTube object or called the turn on method, was then updated with proper arguments.
- **Timer**: Two new functionalities have been added, aimed at allowing a user to increase and decrease the microwave oven's timer while it is counting down. Additionally, tests have been conducted to assess these newly added functionalities.
- **Add Second Timer**: A button has been added that are able to add 10 seconds to the timer. The way the timer is calculated and displayed is also revamped in order to make it possible to add seconds. this functionality has been tested just like the original timer was tested, with an extra use case to make sure it adds a minute every time 60 seconds have been added.
### As a further part of this handin, the results from the exercise on Integration Test: a dependency tree and an integration plan must also be included in this document, with a paragraph explaining your strategy and decisions for the Integration plan
In the image folder you’ll be able to find the plan that is described. We decided to take a top-down approach, as most of our new features directly involve changes to the UserInterface, meaning that the most probable potential problems will show up during the first round of integration testing.
### Code Coverage ### Code Coverage
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment