Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a Windows application that sorts an array of numbers using the bubble sort we discussed in class. This is a video of what it

Write a Windows application that sorts an array of numbers using the bubble sort we discussed in class. This is a video of what it should look like as you run it:
You should have a list box named IstNumbersToSort and a button named btnSortList. The form load for your main form should contain the following code:
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Dim I As Integer
For I=0 To 500
lstNumbersToSort. Items.Add(CInt (Rnd ()*1000.0))
Next
End Sub
The Rnd() function will create a random number between 0 and 1 as a double. Have the "button click" for the button do the sorting.
HINT: When it is running, you will not see the values swap in the listbox unless you put the following line of code after a "value swap" has been done:
Without it, the listbox values will only be refreshed only after all processing is done. I will explain in class why this is so and what the "DoEvents" does.
DO THIS IN VISUAL BASICS WINDOWS FORM APP
image text in transcribed

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