Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

What is the code in Java? USE STRINGBUILDER... Sample Output Destination: London Destination: Paris Destination: Rome Destination: done Instructions: Write a program that does the

What is the code in Java? USE STRINGBUILDER...

image text in transcribed

Sample Output Destination: London Destination: Paris Destination: Rome Destination: done Instructions: Write a program that does the following Create an ArrayList of Strings and call it itinerary Read in destinations from the user until the user enters done (or DONE, or dOnE,..) As you read in the destinations add them to the itinerary Next You need to create a String called travelRoute that includes the travel route as shown in the output . Use a StringBuilder called sb to create the String travelRoute . tl route: LONDON to PARIS to ROME Loop through all the elements of the ArrayList itinerary -Change the destinations (e.g. Rome) to all uppercase letters (e.g. ROME) before adding them to sb -Add the word to (lowercase) between the destinations, but not at the end) When you are done create the string travelRoute based on the information stored in sb. Print the String travelRoute

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

Concepts of Database Management

Authors: Philip J. Pratt, Joseph J. Adamski

7th edition

978-1111825911, 1111825912, 978-1133684374, 1133684378, 978-111182591

More Books

Students also viewed these Databases questions

Question

What is affirmative action?

Answered: 1 week ago

Question

=+e. User: uses the item or service.11

Answered: 1 week ago