Answered step by step
Verified Expert Solution
Question
1 Approved Answer
C# 5.4 Sorting Bubble Sort for N items loop N times loop from 0 up to N-1 Computers spend a lot of time sorting things
C#
5.4 Sorting Bubble Sort for N items loop N times loop from 0 up to N-1 Computers spend a lot of time sorting things into order and there are many different sorting algorithms to choose from. One of the simplest (and slowest) is called the Bubble Sort, It has one loop contained inside another loop as shown here if current item > next item swap the two items end if end loop Your Tasks end loop Create a new project for this task with a class called Bubble Add a new method called inputNumbers() which inputs 6 numbers into an array Add a second method called display() which clears the screen and displays all the numbers one above the other Make sure the program works correctly so far Now add a third method called sortNumbers() which applies the Bubble Sort algorithm to sort the numbers into numerical order 1. 2. 3. nd 4. 5. 6. Call the methods in the right order and get the sorting to work. 7. Try it for 20 numbers 8. Add 3 more methods to apply a similar technique to sorting a list of names into alphabetical order
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started