Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Java use the following code then have it print out The pool is width wide and depth deep and as order its a shape. Have

Java use the following code then have it print out

"The pool is width wide and depth deep and as order its a shape."

Have this repeat for each pool

import java.util.*; class InputWithArrayList { public static void main(String[] args) { Scanner sc=new Scanner(System.in); ArrayList pool=new ArrayList(); int count=1; int j=1; System.out.print("Enter Width : "); String width=sc.nextLine(); System.out.print("Enter Depth : "); String depth=sc.nextLine(); System.out.print("Enter Shape : "); String shape=sc.nextLine(); int w=Integer.parseInt(width); int d=Integer.parseInt(depth); while(true) { if(w==-1 || d==-1) break; pool.add(width); pool.add(depth); pool.add(shape); System.out.print("Enter Width : "); width=sc.nextLine(); w=Integer.parseInt(width); if(w==-1) break; System.out.print("Enter Depth : "); depth=sc.nextLine(); d=Integer.parseInt(depth); if(d==-1) break; System.out.print("Enter Shape : "); shape=sc.nextLine(); }

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_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

Strategic Database Technology Management For The Year 2000

Authors: Alan Simon

1st Edition

155860264X, 978-1558602649

More Books

Students also viewed these Databases questions

Question

4 What are the alternatives to the competences approach?

Answered: 1 week ago

Question

=+ Who do you think is right? Why?

Answered: 1 week ago