Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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 ... blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Accounting Information Systems

Authors: Vernon Richardson, Chengyee Chang, Rod Smith

2nd edition

1260153156, 1260153150, 978-1260153156

More Books

Students also viewed these Programming questions

Question

What leadership roles are available to nonmanagers?

Answered: 1 week ago

Question

Compare a schedule/control Gantt chart and a precedence network.

Answered: 1 week ago

Question

What is the critical chain method?

Answered: 1 week ago