Question: In your final project, you will create a program that will help you manage a collection of recipes. The Recipe class you build for this
In your final project, you will create a program that will help you manage a collection of recipes. The Recipe class you build for this milestone will hold all the details of the recipe, the methods to create a new recipe, and a method to print a recipe. In your final project submission, this class will also contain a custom method to add a new feature. In your submission for Milestone Two, you will include commented out pseudocode for this method. In this milestone, you submit the final project version of your Recipe class. Your submission should include the Recipe.java file and a Recipe_Test.java file. Your Recipe class should include the following items: Instance variables: recipeName, servings, recipeIngredients, and totalRecipeCalories Accessors and mutators for the instance variables Constructors A printRecipe() method A createNewRecipe() method to build a recipe from user input Pseudocode for the custom method selected from the list in Stepping Stone Lab Five Your Recipe_Test.java file containing a main() method that: Uses a constructor to create a new recipe Accesses the printRecipe() method to print the formatted recipe Invokes the createNewRecipe() method to accept user input. Specifics Here is the code so far that I've done for the Recipe Class. I'm getting red squiggly lines in a couple spots.
Here is the code:

package recipe.collection;
import java.util.ArrayList; import java.util.Scanner;
public class Recipe { private String recipeName; private int serving; private ArrayListrecipeIngredients; private double totalRecipeCalories; public void main(String[] args){ Recipe r = createNewRecipe(); r.printRecipe(); } public Recipe() { this.recipeName = ""; this.serving = 0; //(); // getRecipeIngredients() { return recipeIngredients; } //sets the ingredients held by the array public void setRecipeIngredients(ArrayList recipeIngredients){ this.recipeIngredients = recipeIngredients; } //accessor that calls the total recipe calories public double getTotalRecipeCalories(){ return totalRecipeCalories; } //mutator that sets the total recipe calories public void setTotalRecipeCalories(double totalRecipeCalories){ this.totalRecipeCalories = totalRecipeCalories; } //Recipe class public Recipe(String recipeName, int servings, ArrayList recipeIngredients, double totalRecipeCalories) // recipeIngredients = new ArrayList(); boolean addMoreIngredients = true; String reply=""; Scanner scnr = new Scanner(System.in); System.out.println("Please enter the recipe name: "); String recipeName = scnr.nextLine(); System.out.println("Please enter the number of servings: "); int servings = scnr.nextInt(); do { System.out.println("Please enter the ingredient name or type end if you are finished entering ingredients: "); String ingredientName = scnr.next(); if (ingredientName.toLowerCase().equals("end")) { addMoreIngredients = false; } else { recipeIngredients.add(ingredientName); System.out.println("Please enter the ingredient amount: "); float ingredientAmount = scnr.nextFloat(); System.out.println("Please enter the ingredient Calories: "); int ingredientCalories = scnr.nextInt(); totalRecipeCalories = ingredientCalories * ingredientAmount; System.out.println("Do you want to continue. Y/N"); reply = scnr.nextLine(); } } while (!reply.equals("n")) ; scnr.close(); Recipe recipe1 = new Recipe(recipeName, servings, recipeIngredients, totalRecipeCalories); return recipe1; } public void printRecipeWithDifferentServings(int n){ int singleServingCalories = (int) totalRecipeCalories / serving; for (int i = 0; i For problem 4 I've chosen solution A.
public void printRecipe) int singleServingCalories = (int) totalRecipeCal ories / serving; Syeres.out.priatia( Recige eetpelane " Servess - "zin. Ingredients;, ",; for (int ? 0; ? recipeIngredients.size(); ?++) { System.out.print (recipeIngredients.get (i) .getRecipeNam+ "") System.out.print (recipeIngredients.get (i) .getServing) + ) System.out.print (recipeIngredients.get (i) .getTotalRecipeCalories)) System.out.print (".Each serving has "singleServingCalories"calories") Recipe createNewRecipe)