Hello, two JAVA files have been created based on the following requirements: THE PROGRAM DOES NOT RUN
Question:
Hello, two JAVA files have been created based on the following requirements: THE PROGRAM DOES NOT RUN AND HAVE SOME ERRORS PLEASE HELP:
A 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:
See file below:
package milestone.two.recipe.pkgclass;
import java.util.Scanner;
import java.util.ArrayList;
public class MilestoneTwoRecipeClass {
private String recipeName; private int servings; ArrayList
A 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
see file below:
package milestone.two.recipe.pkgclass;
public class RecipeTest {
/** * @param args the command line arguments */ public static void main(String[] args) { // TODO code application logic here final milestone.two.recipe.pkgclass newmilestone.two.recipe.pkgclass = new milestone.two.recipe.pkgclass(); milestone.two.recipe.pkgclass addNewmilestone.two.recipe.pkgclass = newmilestone.two.recipe.pkgclass.addNewmilestone.two.recipe.pkgclass(); newmilestone.two.recipe.pkgclass.printmilestone.two.recipe.pkgclass(); } }
Management Accounting
ISBN: 9780730369387
4th Edition
Authors: Leslie G. Eldenburg, Albie Brooks, Judy Oliver, Gillian Vesty, Rodney Dormer, Vijaya Murthy, Nick Pawsey