Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Java Program. Write a console program that repeatedly prompts the user to enter data until they type done (any case, Upper, Lower, or Mixed). As

Java Program.

Write a console program that repeatedly prompts the user to enter data until they type done

(any case, Upper, Lower, or Mixed). As they enter the data, assign it to a two-dimension array

where the first dimension contains exactly what they type and the second dimension contains

the first non-whitespace character of what they type, in lowercase. If they enter a blank line, it

is acceptable to skip that line. When they type done, do these steps:

1. display: As Entered

2. for each entry in the array, display the index of the first dimension, the second

dimension's value, and the first dimension's value on a single line separated by :

(colon).

3. display: Bubble Sorted

4. using a bubble sort, for each entry in the array, display the original index of the first

dimension, the second dimension's value, and the first dimension's value on a single

line separated by : (colon) sorted by the second dimension.

5. display: Selection Sorted

6. using a selection sort, for each entry in the array, display the original index of the first

dimension, the second dimension's value, and the first dimension's value on a single

line separated by : (colon) sorted by the first dimension.

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

Students also viewed these Databases questions