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

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

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 Programming Questions!