Question: Problem 4. (10 points) Goal: Practice how to create user-defined classes in Java. A microwave control panel has five buttons: 1) one for increasing the

 Problem 4. (10 points) Goal: Practice how to create user-defined classes

Problem 4. (10 points) Goal: Practice how to create user-defined classes in Java. A microwave control panel has five buttons: 1) one for increasing the time by 30 seconds, 2) one for switching between power levels, Low, Medium, and High, 3) a stop button, 4) a reset button, and 5) a start button. Implement a class that simulates the microwave, with a method for each button. The method for start button should print a message Cooking for ... seconds at level ... and changes the current status of the microwave. The method for stop button should print a message Cooking stopped. and changes the current status of the microwave. Based on the above description, you must figure out the required properties of the microwave control panel. At the end, write a separate Java program as the tester to test your microwave class with different values. Note*: There is no graphical task in this problem. Java file names: Microwave.java and TestMicrowave.java

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!