Your Perfect Assignment is Just a Click Away
We Write Custom Academic Papers

100% Original, Plagiarism Free, Customized to your instructions!

glass
pen
clip
papers
heaphones

Assignment: Creating an ArrayList of strings

Assignment: Creating an ArrayList of strings

Create an ArrayList of strings and call it parks.
Read in the names of national parks from the user until the user enters done (or DONE,
or dOnE, .. )  Keep in mind, that the names of some national parks consist of more than one word, for example, Mesa Verde.
As you read in the national parks, add them to the list.
Next, we are going to build a string based on the elements in the list parks. Since the text keeps changing as we add one park at a time, we use class StringBuilder for this task.  
Use a StringBuilder  called sb to create the string  nationalParks  .
Loop through all the elements of the list  parks and add them one at a time.
The resulting string should have the following format:
Favorite National Parks: {park1} | {park2} | . . . | {parkN}
The parks are separated by a space, a vertical bar, and another space. However, there is no vertical bar after the last element. {park1}, {park2}, {parkN} are the various list elements with updated spelling.
Create a private method to update the spelling.
We can’t control whether the user enters the park names in uppercase or lowercase letters. However, we can change the names to a spelling where all letters are lowercase except for the first letters of each individual word. In order to make those changes, create a private method called updateSpelling. It has the following method header:
private static String updateSpelling(String text)
E.g.: When you pass the string “MESA VERDE” the method returns “Mesa Verde”
E.g.: When you pass  “yEllOwstOnE” it returns “Yellowstone”
E.g.: Passing “black canyon of the gunnison” returns “Black Canyon Of The Gunnison”
E.g.: Passing  “Denali” returns “Denali”

Order Solution Now

Our Service Charter

1. Professional & Expert Writers: Topnotch Essay only hires the best. Our writers are specially selected and recruited, after which they undergo further training to perfect their skills for specialization purposes. Moreover, our writers are holders of masters and Ph.D. degrees. They have impressive academic records, besides being native English speakers.

2. Top Quality Papers: Our customers are always guaranteed of papers that exceed their expectations. All our writers have +5 years of experience. This implies that all papers are written by individuals who are experts in their fields. In addition, the quality team reviews all the papers before sending them to the customers.

3. Plagiarism-Free Papers: All papers provided by Topnotch Essay are written from scratch. Appropriate referencing and citation of key information are followed. Plagiarism checkers are used by the Quality assurance team and our editors just to double-check that there are no instances of plagiarism.

4. Timely Delivery: Time wasted is equivalent to a failed dedication and commitment. Topnotch Essay is known for timely delivery of any pending customer orders. Customers are well informed of the progress of their papers to ensure they keep track of what the writer is providing before the final draft is sent for grading.

5. Affordable Prices: Our prices are fairly structured to fit in all groups. Any customer willing to place their assignments with us can do so at very affordable prices. In addition, our customers enjoy regular discounts and bonuses.

6. 24/7 Customer Support: At Topnotch Essay, we have put in place a team of experts who answer to all customer inquiries promptly. The best part is the ever-availability of the team. Customers can make inquiries anytime.