Question
Stepping_Stone5_Recipe mySecondRecipe = new Stepping_Stone5_Recipe(Pizza, 2,recipeIngredient, 300); // Initialize first recipe String IngredientNameTwo = Noddles; Ingredient tempIngredientTwo = new Ingredient().addIngredient(IngredientNameTwo);
Stepping_Stone5_Recipe mySecondRecipe = new Stepping_Stone5_Recipe("Pizza", 2,recipeIngredient, 300);
// Initialize first recipe
String IngredientNameTwo = "Noddles";
Ingredient tempIngredientTwo = new Ingredient().addIngredient(IngredientNameTwo);
recipeIngredientTwo.add(tempIngredientTwo);
myFirstRecipe.setRecipeName("Ramen");
myFirstRecipe.setServings(2);
myFirstRecipe.setRecipeIngredients(recipeIngredientsTwo);
myFirstRecipe.setTotalRecipeCalories(150);
// Print details of both recipes
myFirstRecipe.printRecipe();
mySecondRecipe.printRecipe();
Recipe newRecipe = new Recipe();
newRecipe.createNewRecipe();
}
error message
Exception in thread "main" java.lang.RuntimeException: Uncompilable code - cannot find symbol
symbol: variable recipeIngredient
location: class stepping_stone5_receipe.Stepping_Stone5_RecipeTest
at stepping_stone5_receipe.Stepping_Stone5_RecipeTest.main(Stepping_Stone5_RecipeTest.java:1)
C:\Users\ibekw\AppData\Local\NetBeans\Cache\16\executor-snippets\run.xml:111: The following error occurred while executing this line:
C:\Users\ibekw\AppData\Local\NetBeans\Cache\16\executor-snippets\run.xml:68: Java returned: 1
BUILD FAILED (total time: 1 second)
Please help, I am having issues running my recipeTest class. Error message is shown above
Step by Step Solution
3.47 Rating (150 Votes )
There are 3 Steps involved in it
Step: 1
The error message suggests that there is an issue with the variable recipeIngredient in your code ...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