Documentos de Académico
Documentos de Profesional
Documentos de Cultura
Practica 22
Practica 22
de Datos
Practica #22
Manejo de Estructuras de Repetición en ordenamiento
Gpo: 5101
Matricula: 080260221-9
Lista de Cotejo
Práctica # 22 Manejo de estructuras de repetición en
ordenamiento
INSTRUCCIONES DE APLICACIÓN.
Verifique que se encuentren los componentes señalados abajo y marque con una √ el registro
de cumplimiento correspondiente.
REGISTRO DE
REGISTRO DE
Sarahi V. W.
Burbuja
ListBox1.Items.Add(15)
ListBox1.Items.Add(3)
ListBox1.Items.Add(7)
ListBox1.Items.Add(8)
ListBox1.Items.Add(17)
End Sub
a(0) = ListBox1.Items(0)
a(1) = ListBox1.Items(1)
a(2) = ListBox1.Items(2)
a(3) = ListBox1.Items(3)
a(4) = ListBox1.Items(4)
For x = 0 To 4
For y = 0 To 3
If (a(y) <= a(y + 1)) Then
temp = a(y)
a(y) = a(y + 1)
a(y + 1) = temp
End If
Next y
Next x
ListBox1.Items.Clear()
For x = 0 To 4
ListBox1.items.Add(a(x))
Next x
End Sub
End Class
FechasBurbuja
Imports System.Data.OleDb
Public Class Form1
Dim dt As New DataTable
Dim cn As New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=C:\Wallmach\Fecha.mdb")
Public fila As Integer = 0
Case 2
Label4.Text = Label4.Text + " de Febrero de "
Case 3
Label4.Text = Label4.Text + " de Marzo de "
Case 4
Label4.Text = Label4.Text + " de Abril de "
Case 5
Label4.Text = Label4.Text + " de Mayo de "
Case 6
Label4.Text = Label4.Text + " de Junio de "
Case 7
Label4.Text = Label4.Text + " de Julio de "
Case 8
Label4.Text = Label4.Text + " de Agosto de "
Case 9
Label4.Text = Label4.Text + " de Septiembre de "
Case 10
Label4.Text = Label4.Text + " de Octubre de "
Case 11
Label4.Text = Label4.Text + " de Noviembre de "
Case 12
Label4.Text = Label4.Text + " de Diciembre de "
End Select
Label4.Text = Label4.Text + Str(ListBox3.SelectedItem)
End Sub
'METODO ACTUALIZA EL LISTBOX
Public Sub Actualiza()
ListBox1.Items.Add(Int(dt.Rows(fila)("D")))
ListBox2.Items.Add(Int(dt.Rows(fila)("M")))
ListBox3.Items.Add(Int(dt.Rows(fila)("A")))
End Sub
a(0) = ListBox1.Items(0)
a(1) = ListBox1.Items(1)
a(2) = ListBox1.Items(2)
a(3) = ListBox1.Items(3)
For x = 0 To 3
For y = 0 To 2
If (a(y) <= a(y + 1)) Then
temp = a(y)
a(y) = a(y + 1)
a(y + 1) = temp
End If
Next y
Next x
ListBox1.Items.Clear()
For x = 0 To 3
ListBox1.Items.Add(a(x))
Next x
a(0) = ListBox2.Items(0)
a(1) = ListBox2.Items(1)
a(2) = ListBox2.Items(2)
a(3) = ListBox2.Items(3)
For x = 0 To 3
For y = 0 To 2
If (a(y) <= a(y + 1)) Then
temp = a(y)
a(y) = a(y + 1)
a(y + 1) = temp
End If
Next y
Next x
ListBox2.Items.Clear()
For x = 0 To 3
ListBox2.Items.Add(a(x))
Next x
a(0) = ListBox3.Items(0)
a(1) = ListBox3.Items(1)
a(2) = ListBox3.Items(2)
a(3) = ListBox3.Items(3)
For x = 0 To 3
For y = 0 To 2
If (a(y) <= a(y + 1)) Then
temp = a(y)
a(y) = a(y + 1)
a(y + 1) = temp
End If
Next y
Next x
ListBox3.Items.Clear()
For x = 0 To 3
ListBox3.Items.Add(a(x))
Next x
End Sub
End Class