Software

please read the instructions carefully. Due is March 16th. 

Save Time On Research and Writing
Hire a Pro to Write You a 100% Plagiarism-Free Paper.
Get My Paper

/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/package Solutions;
import java.util.Scanner;

/**
*
* @author spike
*/
public class SteppingStone3_Branches {

public static void main(String[] args) {
int numberCups = -1;
final int MAX_CUPS = 100;

Scanner scnr = new Scanner(System.in);

Save Time On Research and Writing
Hire a Pro to Write You a 100% Plagiarism-Free Paper.
Get My Paper

System.out.println(“Please enter the number of cups (between 1 and 100): “);

if (scnr.hasNextInt()) {
numberCups = scnr.nextInt();
if (numberCups >= 1 && numberCups <= MAX_CUPS) { System.out.println(numberCups + " is a valid number of cups!"); } else { System.out.println(numberCups + " is a not valid number of cups!"); System.out.println("Please enter another number of cups between 1 and 100: "); numberCups = scnr.nextInt(); if (numberCups >= 1 && numberCups <= MAX_CUPS) { System.out.println(numberCups + " is a valid number of cups!"); } else if (numberCups < 1) { System.out.println(numberCups + " is less than 1. Sorry you are out of tries."); } else { System.out.println(numberCups + " is larger than 100. Sorry you are out of tries."); } } } else { System.out.println("Error: That is not a numer. Try again."); } } }

Overview: In Module Five, you have studied how to code for iteration through the use of loops. In Stepping Stone Lab Four, you will develop a simple program with a loop structure for users to enter a list of ingredients.

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 as 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 of the Java ArrayList data type. In this stepping stone lab, you will use the ArrayList to store strings, but in future submissions, you will replace 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 should 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.

Calculate your order
Pages (275 words)
Standard price: $0.00
Client Reviews
4.9
Sitejabber
4.6
Trustpilot
4.8
Our Guarantees
100% Confidentiality
Information about customers is confidential and never disclosed to third parties.
Original Writing
We complete all papers from scratch. You can get a plagiarism report.
Timely Delivery
No missed deadlines – 97% of assignments are completed in time.
Money Back
If you're confident that a writer didn't follow your order details, ask for a refund.

Calculate the price of your order

You will get a personal manager and a discount.
We'll send you the first draft for approval by at
Total price:
$0.00
Power up Your Academic Success with the
Team of Professionals. We’ve Got Your Back.
Power up Your Study Success with Experts We’ve Got Your Back.

Order your essay today and save 30% with the discount code ESSAYHELP