Answered step by step
Verified Expert Solution
Link Copied!
Question
1 Approved Answer

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 recipeIngredients = new ArrayList();
               ArrayList recipeIngredientsTwo = new 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 recipeIngredients = new 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 recipeIngredientsTwo = new 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... 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_2

Step: 3

blur-text-image_3

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

OCP Oracle Certified Professional Java SE 11 Developer Practice Tests Exam 1Z0 819 And Upgrade Exam 1Z0 817

Authors: Scott Selikoff, Jeanne Boyarsky

1st Edition

1119696135, 978-1119696131

Students explore these related Programming questions