Question
A microwave control panel has four buttons: one for increasing the time by 30 seconds, one for switching between power levels 1 and 2, a
A microwave control panel has four buttons: one for increasing the time by 30 seconds, one for switching between power levels 1 and 2, a reset button, and a start button. Implement a class that simulates the microwave, with a method for each button. The method for the start button should print a message Cooking for ... seconds at level ....
Part 1: Design the Microwave Object Class
Using LucidChart (Lucidchart.com), design the Microwave object class as defined above.
Part 2: Implement the Microwave Object Class
As part of a Java application project, implement the Microwave class that you designed in Part 1.
Also, add a main class with test code for the Microwave class:
1.Create a Microwave object.
2.Reset the Microwave.
3.Set the Microwave's cooking time to 2 minutes and 30 seconds.
4.Set the power level to 2.
5.Start the Microwave.
6.Reset the Microwave (time 0, power level 1).
7.Set the Microwave's cooking time to 5 minutes.
8.Start the Microwave.
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