Question
package Stepping_Stone5_Receipe; import java.util.ArrayList; /** * * @author ibekwe okechukwu */ public class Stepping_Stone5_RecipeTest { /** * @param
package Stepping_Stone5_Receipe;
import java.util.ArrayList;
/**
*
* @author ibekwe okechukwu
*/
public class Stepping_Stone5_RecipeTest {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
// Create two recipe objects first
SteppingStone5_Recipe myFirstRecipe = new SteppingStone5_Recipe();
ArrayList
ArrayList
String ingredientName = "Anchovies";
Ingredient tempIngredient = new Ingredient().addNewIngredient(ingredientName);
recipeIngredients.add(tempIngredient);
SteppingStone5_Recipe mySecondRecipe = new SteppingStone5_Recipe("Pizza", 2, recipeIngredients, 300);
// Initialize first recipe
String ingredientNameTwo = "Noodles";
Ingredient tempIngredientTwo = new Ingredient().addNewIngredient(ingredientNameTwo);
recipeIngredientsTwo.add(tempIngredientTwo);
myFirstRecipe.setRecipeName("Ramen");
myFirstRecipe.setServings(2);
myFirstRecipe.setRecipeIngredients(recipeIngredientsTwo);
myFirstRecipe.setTotalRecipeCalories(150);
// Print details of both recipes
myFirstRecipe.printRecipe();
mySecondRecipe.printRecipe();
}
}
ERROR MESSAGE
C:\Users\ibekw\OneDrive\Desktop\Java Projects\Stepping_stone5_receipe\src\stepping_stone5_receipe\Stepping_Stone5_RecipeTest.java:17: error: cannot find symbol
SteppingStone5_Recipe myFirstRecipe = new SteppingStone5_Recipe();
symbol: class SteppingStone5_Recipe
location: class Stepping_Stone5_RecipeTest
C:\Users\ibekw\OneDrive\Desktop\Java Projects\Stepping_stone5_receipe\src\stepping_stone5_receipe\Stepping_Stone5_RecipeTest.java:17: error: cannot find symbol
SteppingStone5_Recipe myFirstRecipe = new SteppingStone5_Recipe();
symbol: class SteppingStone5_Recipe
location: class Stepping_Stone5_RecipeTest
C:\Users\ibekw\OneDrive\Desktop\Java Projects\Stepping_stone5_receipe\src\stepping_stone5_receipe\Stepping_Stone5_RecipeTest.java:18: error: cannot find symbol
ArrayList
symbol: class Ingredient
location: class Stepping_Stone5_RecipeTest
C:\Users\ibekw\OneDrive\Desktop\Java Projects\Stepping_stone5_receipe\src\stepping_stone5_receipe\Stepping_Stone5_RecipeTest.java:19: error: cannot find symbol
ArrayList
symbol: class Ingredient
location: class Stepping_Stone5_RecipeTest
C:\Users\ibekw\OneDrive\Desktop\Java Projects\Stepping_stone5_receipe\src\stepping_stone5_receipe\Stepping_Stone5_RecipeTest.java:21: error: cannot find symbol
Ingredient tempIngredient = new Ingredient().addNewIngredient(ingredientName);
symbol: class Ingredient
location: class Stepping_Stone5_RecipeTest
C:\Users\ibekw\OneDrive\Desktop\Java Projects\Stepping_stone5_receipe\src\stepping_stone5_receipe\Stepping_Stone5_RecipeTest.java:21: error: cannot find symbol
Ingredient tempIngredient = new Ingredient().addNewIngredient(ingredientName);
symbol: class Ingredient
location: class Stepping_Stone5_RecipeTest
C:\Users\ibekw\OneDrive\Desktop\Java Projects\Stepping_stone5_receipe\src\stepping_stone5_receipe\Stepping_Stone5_RecipeTest.java:24: error: cannot find symbol
SteppingStone5_Recipe mySecondRecipe = new SteppingStone5_Recipe("Pizza", 2, recipeIngredients, 300);
symbol: class SteppingStone5_Recipe
location: class Stepping_Stone5_RecipeTest
C:\Users\ibekw\OneDrive\Desktop\Java Projects\Stepping_stone5_receipe\src\stepping_stone5_receipe\Stepping_Stone5_RecipeTest.java:24: error: cannot find symbol
SteppingStone5_Recipe mySecondRecipe = new SteppingStone5_Recipe("Pizza", 2, recipeIngredients, 300);
symbol: class SteppingStone5_Recipe
location: class Stepping_Stone5_RecipeTest
C:\Users\ibekw\OneDrive\Desktop\Java Projects\Stepping_stone5_receipe\src\stepping_stone5_receipe\Stepping_Stone5_RecipeTest.java:28: error: cannot find symbol
Ingredient tempIngredientTwo = new Ingredient().addNewIngredient(ingredientNameTwo);
symbol: class Ingredient
location: class Stepping_Stone5_RecipeTest
C:\Users\ibekw\OneDrive\Desktop\Java Projects\Stepping_stone5_receipe\src\stepping_stone5_receipe\Stepping_Stone5_RecipeTest.java:28: error: cannot find symbol
Ingredient tempIngredientTwo = new Ingredient().addNewIngredient(ingredientNameTwo);
symbol: class Ingredient
location: class Stepping_Stone5_RecipeTest
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
10 errors
BUILD FAILED (total time: 0 seconds)
Please I need help fixing this issue.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
The error message suggests that the compiler cannot find the classes SteppingStone5Recipe and Ingred...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started