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:display: As Entered or each entry in the array, display the index of the first dimension, the second dimensions value, and the first dimensions value on a single line separated by : (colon).display: Bubble Sortedusing a bubble sort, for each entry in the array, display the original index of the first dimension, the second dimensions value, and the first dimensions value on a single line separated by : (colon) sorted by the second dimension.display: Selection Sortedusing a selection sort, for each entry in the array, display the original index of the first dimension, the second dimensions value, and the first dimensions value on a single line separated by : (colon) sorted by the first dimension.Grading Notes:Please read the instructions carefully! Using the wrong sort or dimension will hurt your grade!The instructor will attempt to crash your program an exception will cost you 10 points dont let exceptions happen!If you ensure that duplicate values are sorted with the lower original array index first, you will get 5 extra points (final score not over 100).You can use the sort methods from the book, but you will get 5 extra points if you do them as inner classes and FULLY comment them.Example:User types:appleAppleZoneappledoneYou display:As entered0:a:apple1:a:Apple2:z:Zone3:a:appleBubble Sorted0:a:apple1:a:Apple3:a:apple2:z:ZoneSelection Sorted1:a:Apple0:a:apple3:a:apple2:z:Zone0
Programming
[Solved] SOLVED: Console program that repeatedly prompts the user to enter data until they type done
$25
File Name: SOLVED:_Console_program_that_repeatedly_prompts_the_user_to_enter_data_until_they_type_done.zip
File Size: 857.22 KB
Only logged in customers who have purchased this product may leave a review.
Reviews
There are no reviews yet.