Explanation:
Here's my solution:
import java.util.Scanner; // We start by importing the Scanner, which enables us to put in values
public class Main // our class. Name doesn't really matter here.
{ // Open the brackets of the class.
public static void main(String[] args) { // This is our main method. It will run when we run the class.
System.out.println("Starting Taffy Timer..."); // When we start the timer, we will print out that we do so
Scanner re = new Scanner(System.in); // Import the scanner into the main method
int temp; // Define the integer called temperature that the user will put in
do { /* This is a do while loop -- it will go through the loop, and then it will check the value.
I decided to use this because we can define temperature without checking the value first.
What this loop is doing is taking in the temperature, and then checking if it's right. If
it's a high enough temperature, it will tell the user that it's ready, but if not, it won't. */
temp = re.nextInt(); // Allow the user to enter in the temperature
if(temp >= 270) { // if it's high enough, say that it's ready
System.out.println("Your taffy is ready for the next step!");
}
else { // if not, don't
System.out.println("The mixture isn't ready yet.");
}
}
while(temp < 270); // This makes sure that if it's ready for the next step, we don't have to continue
}
}