Question: Write a program that prompts the user to enter three cities and displays them in ascending order. Here is a sample run: Enter the first

Write a program that prompts the user to enter three cities and displays them in ascending order. Here is a sample run:

Enter the first city: Chicago JEnter Enter the second city: Los Angeles

Enter the first city: Chicago JEnter Enter the second city: Los Angeles JEnter Enter the third city: Atlanta JEnter The three cities in alphabetical order are Atlanta Chicago Los Angeles

Step by Step Solution

3.38 Rating (179 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Program Plan Create a class called OrderThreeCities Initialize the main method with variable first s... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Java Programming Questions!