You are on page 1of 5

Lista de Cotejo

Práctica # 22 Manejo de estructuras de repetición en


ordenamiento

Nombre de la Materia: Plantel: Conalep Juárez I


Programación Básica
Instructor: Ing. Sergio González Pérez Grupo: 5101
Alumno: Anabel Nieto Zacatzu Fecha de aplicación : / / 2010

INSTRUCCIONES DE APLICACIÓN.
Verifique que se encuentren los componentes señalados abajo y marque con una √ el registro
de cumplimiento correspondiente.

REGISTRO DE

No Características a verificar CUMPLIMIENTO OBSERVACIONES


SI NO
1 Inicia el Sistema Gestor de Base de Datos 
2 Abre la Base de Datos que será utilizada 
3 Realiza los pasos de la practica 
4 Manipula correctamente el SGBD 
5 Almacena en su carpeta las actividades planteadas 
6 Realiza el reporte del resultado del programa. 
DESARROLLO

REGISTRO DE

No Actividades a desarrollar CUMPLIMIENTO OBSERVACIONES


SI NO
1 Inicializa Lenguaje de Programación 
2 Agrega Formulario 
3 Diseña los Controles del Formulario 
4 Realiza Código de Ordenamiento Numérico 

Firma del Alumnos Firma del Instructor


Practica #22
Public Class Form1

Dim x As Integer
Dim y As Integer

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e


As System.EventArgs) Handles Button2.Click
ListBox1.Items.Add(9)
ListBox1.Items.Add(8)
ListBox1.Items.Add(7)
ListBox1.Items.Add(10)
ListBox1.Items.Add(5)

End Sub

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e


As System.EventArgs) Handles Button1.Click

Dim a(5) As Integer


For x = 0 To 4
a(x) = ListBox1.Items(x)
Next x
For x = 0 To 4
For y = 0 To 3

If (a(y) <= a(y + 1)) Then


x = a(y)
a(y) = a(y + 1)
a(y + 1) = x

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
Public Class Form1
Dim x As Integer
Dim y As Integer
Dim a(5) As Integer

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e


As System.EventArgs) Handles Button2.Click
ListBox1.Items.Add(10)
ListBox1.Items.Add(51)
ListBox1.Items.Add(20)
ListBox1.Items.Add(22)
ListBox1.Items.Add(11)
ListBox2.Items.Add(1)
ListBox2.Items.Add(4)
ListBox2.Items.Add(2)
ListBox2.Items.Add(10)
ListBox2.Items.Add(11)
ListBox3.Items.Add(1985)
ListBox3.Items.Add(1996)
ListBox3.Items.Add(1995)
ListBox3.Items.Add(1994)
ListBox3.Items.Add(1993)

End Sub

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e


As System.EventArgs) Handles Button1.Click

For x = 0 To 4
a(x) = ListBox1.Items(x)
Next x
For x = 0 To 4
For y = 0 To 3

If (a(y) >= a(y + 1)) Then


x = a(y)
a(y) = a(y + 1)
a(y + 1) = x

End If

Next y
Next x

ListBox1.Items.Clear()
For x = 0 To 4
ListBox1.Items.Add(a(x))
Next x

For x = 0 To 4
a(x) = ListBox2.Items(x)
Next x
For x = 0 To 4
For y = 0 To 3

If (a(y) >= a(y + 1)) Then


x = a(y)
a(y) = a(y + 1)
a(y + 1) = x

End If

Next y
Next x

ListBox2.Items.Clear()
For x = 0 To 4
ListBox2.Items.Add(a(x))
Next x

For x = 0 To 4
a(x) = ListBox3.Items(x)
Next x
For x = 0 To 4
For y = 0 To 3

If (a(y) >= a(y + 1)) Then


x = a(y)
a(y) = a(y + 1)
a(y + 1) = x

End If

Next y
Next x

ListBox3.Items.Clear()
For x = 0 To 4
ListBox3.Items.Add(a(x))
Next x

End Sub

Private Sub Button3_Click(ByVal sender As System.Object, ByVal e


As System.EventArgs) Handles Button3.Click
Label4.Text = Str(ListBox1.SelectedItem)
Select Case Int(ListBox2.SelectedItem)
Case 1
Label4.Text = Label4.Text + " de enero de "
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 noviemebre de "
Case 12
Label4.Text = Label4.Text + " de diciembre de "

End Select
Label4.Text = Label4.Text + ListBox3.Text

End Sub

End Class

You might also like