/JAVA_Microwave

A JAVA Microwave simulator, increacook time, switch power levels, start, reset, and shutdown controls.

Primary LanguageJava

Microwave Control Panel

This is a simple Java program that simulates a microwave control panel with the following functionalities:

  • Increase time by 30 seconds
  • Switch between power levels 1 and 2
  • Start the microwave
  • Reset the microwave
  • Turn off the microwave
Features
The program allows the user to interact with the microwave using console input. It provides a menu of options for the user to choose from, and executes the corresponding actions:

    Increase time by 30 seconds
    Switch power level between 1 and 2
    Start the microwave
    Reset the microwave
    Turn off the microwave

How to Use
To use the program, follow these steps:

    Clone the repository to your local machine.
    Compile the <code>Main.java</code> file using a Java compiler.
    Run the compiled <code>Main</code> class.
    Follow the on-screen instructions to interact with the microwave control panel.

Example
Here's an example of how the interaction might look like:

Microwave control panel:

  1. Increase time by 30 seconds

  2. Switch power level between 1 and 2

  3. Start the microwave

  4. Reset the microwave

  5. Turn off the microwave Choose an option (1-5): 1 Added 30 seconds. Current time: 30 seconds. Choose an option (1-5): 2 Power level set to: 2 Choose an option (1-5): 3 Cooking for 30 seconds at power level 2. Choose an option (1-5): 4 Microwave reset. Time is now 0 seconds and power level is 1. Choose an option (1-5): 5 Turning off the microwave. Goodbye!

    Contributing

    Contributions are welcome! If you have any suggestions or improvements, feel free to create a pull request or open an issue.