Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

PLEASE ASSIST ON WRITING CODE FOR JAVA WITH CODE COMMENTS. THANK YOU. Develop a simple program with a loop structure for users to enter a

PLEASE ASSIST ON WRITING CODE FOR JAVA WITH CODE COMMENTS. THANK YOU.

Develop a simple program with a loop structure for users to enter a list of ingredients.

Be sure to review the Stepping Stone Lab Four guidelines before beginning this lab. The completed code (.java file) from Stepping Stone Lab Three is included in this module to use as a reference for comparison of your work in Module Four as well as moving forward. This code serves a number of functions:

It allows you to review your own submitted code.

You may utilize it as a useful foundation for Stepping Stone Lab Three as well a s other assignments to come.

Together with instructor feedback on your submitted code , you are building your own final project application.

The code for this stepping stone lab is short, but the concepts are extremely important. You will use two different looping techniques: a do loop and a for loop. This stepping stone lab also includes your first application o f the Java ArrayList data type. In this stepping stone lab , you will use the ArrayList to store strings, but in future submissions, you will re place these with object types (ingredients).

Prompt : In this lab, you will write a short Java application that uses a loop control structure. Specifically, your application shoul d accomplish the following:

Create an ArrayList to store the list of ingredient names added by the user.

Implement the do while loop structure to allow the user to add ingredients until he or she is done.

Within your loop, add a branch control structure to prompt the user to enter an ingredient or indicate that he or she is finished.

Use a for loop to iterate through the ingredientList to print the ingredients in the list .

Guidelines for Submission: This assignment should be submitted as a Java file.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

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

Modern Database Management

Authors: Jeff Hoffer, Ramesh Venkataraman, Heikki Topi

12th edition

133544613, 978-0133544619

More Books

Students also viewed these Databases questions

Question

What is Hormel foods 2019 WACC for dividend growth & CAPM?

Answered: 1 week ago