008-003-002
Method Call Chain: Recipe Steps
Easy
Problem Description
method Call Chain: Recipe Steps
In this problem, you will create a program that calls step methods (prepare ingredients, start cooking, and plate up) sequentially from a cook method and displays the recipe to standard output.
Learning Objective: Call other methods from method
Create a program displaying cooking steps. Call multiple step methods from the cook method to display the recipe.
Input
Line 1: Dish name (string)
Output
Making [dish]
1. Prepare ingredients
2. Start cooking
3. Plate up
Complete!
Test Cases
※ Output examples follow programming industry standards
Normal case
Input:
Curry
Expected Output:
Making Curry 1. Prepare ingredients 2. Start cooking 3. Plate up Complete!
Normal case
Input:
Pasta
Expected Output:
Making Pasta 1. Prepare ingredients 2. Start cooking 3. Plate up Complete!
Your Solution
Current Mode:● My Code
99
1
2
3
4
5
6
7
8
9
10
›
⌄
⌄
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
// Write your code here
sc.close();
}
}
0 B / 5 MB
You have 10 free executions remaining
