Question: public class MicrowaveCooking { public static void main(String[] args) { // Generate a random number of seconds // between 0 and 60 // Print the
public class MicrowaveCooking
{
public static void main(String[] args)
{
// Generate a random number of seconds
// between 0 and 60
// Print the number of seconds
// Use two if statements to print
// whether the roll is fine or will catch fire
}
}
![public class MicrowaveCooking{public static void main(String[] args){// Generate a random number of](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/10/670fd5861a480_949670fd585def04.jpg)
Write a program that helps a novice microwave chef decide how long to microwave a refrigerated bread roll. Use the Math class to generate a random integer between 0 and 60 to represent the number of seconds the roll will be microwaved. Print out the number of seconds generated. If the number is less than or equal to 20, print Perfect cooking time! If the number is greater than 20, print Your roll will catch Fire! If you've forgotten how to use random numbers, refer back to this example: Random Number Example Here are a few output examples Example 1: Microwaving for 21 seconds Your roll will catch fire! Example 2: Microwaving for 9 seconds Perfect cooking time
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
