You've decided to cook a vegan pizza and now you need to perform the following steps in the right order (like in the sample output). Correct the mistake in the program and cook your pizza!
Note: go through these classes to understand the code better.
class Base extends Thread {
@Override
public void run() {
System.out.println("cook base");
}
}
class Tomatoes extends Thread {
@Override
public void run() {
for (int i = 3; i >= 1; i--) {
System.out.println("slice tomatoes " + i);
}
}
}
class Tofu extends Thread {
@Override
public void run() {
System.out.println("fry tofu");
}
}
class Bake extends Thread{
@Override
public void run() {
for (int i = 4; i >= 0; i--) {
if (i == 0) {
System.out.println("Your pizza is ready!");
break;
}
System.out.println("to bake..." + i + " min");
}
}
}