Documentos de Académico
Documentos de Profesional
Documentos de Cultura
Para Proyecto PDF
Para Proyecto PDF
GUÍA DE LABORATORIO Nº 2
Objetivos
Luego de completar este laboratorio, el estudiante será capaz
de:
Consideraciones
Para el desarrollo del presente laboratorio Ud. deberá crear
una carpeta, para guardar sus trabajos correspondientes a este
laboratorio.
Aplicación Nº 1
Se desea elaborar la boleta de pago de los trabajadores de una
fábrica. Para ello se cuenta con los siguientes datos de entrada:
2 GroupBox
5 etiquetas
8 cajas de texto
2 botones de opción
3 casillas de verificación
3 botones de comando
Form1
Name FrmBoletaDePago
FormBorderStyle Fixed Dialog
Text Boleta de pago
Label1
Name LblTrabajador
AutoSize True
Text Trabajador:
Label2
Name LblSueldoBasico
AutoSize True
Text Sueldo Bruto S/.
Label3
Name LblHorasExtras
AutoSize True
Text Horas extras:
Label4
Name LblPagoHoraExtra
AutoSize True
Text Pago hora extra S/.
Label5
Name LblSueldoNeto
AutoSize True
Text Sueldo neto S/.
Text1
Name TxtTrabajador
Text
Text2
Name TxtSueldoBasico
Text
Text3
Name TxtHorasExtras
Text
Text5
Name TxtRenta
Enabled False
Text
Text6
Name TxtFonavi
Enabled False
Text
Text7
Name TxtAFP
Enabled False
Text
Text8
Name TxtSueldoNeto
Enabled False
Text
Option1
Name OptDiurno
Text Diurno
Checked True
Option2
Name OptNocturno
Text Nocturno
Checked False
Check1
Name ChkRenta
Text Renta
Check2
Name ChkFonavi
Text Fonavi
Check3
Name ChkAFP
Text AFP
Command2
Name BtnLimpiar
Text &Limpiar
Command3
Name BtnSalir
Text &Salir
SueldoBase = CDbl(TxtSueldoBase.Text)
HorasExtras = CInt(TxtHorasExtras.Text)
If OptDiurno.Checked Then
PagoHoraExtra = 10
End If
If OptNocturno.Checked Then
PagoHoraExtra = 15
End If
TxtPagoHoraExtra.Text = CStr(PagoHoraExtra)
If ChkRenta.Checked Then
Renta = SueldoBase * 0.1
Else
Renta = 0
End If
TxtRenta.Text = CStr(Renta)
If ChkFonavi.Checked Then
Fonavi = SueldoBase * 0.07
Else
Fonavi = 0
End If
TxtFonavi.Text = CStr(Fonavi)
If ChkAFP.Checked Then
AFP = SueldoBase * 0.03
Else
AFP = 0
End If
TxtAFP.Text = CStr(AFP)
Ingresos = SueldoBase + PagoHoraExtra * HorasExtras
Descuentos = Renta + Fonavi + AFP
SueldoNeto = Ingresos - Descuentos
TxtSueldoNeto.Text = CStr(SueldoNeto)
End Sub
Aplicación Nº 2
Cuatro notas entre 0 y 20 representan las calificaciones de un
estudiante de un curso de programación. Elaborar una aplicación
para obtener el promedio de esas calificaciones y visualizar su
puntuación de acuerdo al siguiente cuadro:
Promedio Puntuación
19-20 A
16-18 B
11-15 C
6-10 D
0-5 E
7 etiquetas
7 cajas de texto
3 botones de comando
Luego, proceda a establecer las propiedades según se indica a
continuación:
Form1
Name FrmNotas
FormBorderStyle 3-Fixed Dialog
Text Puntuación de un estudiante
Label1
Name LblAlumno
AutoSize True
Text Alumno:
Label2
Name LblN1
AutoSize True
Text Nota 1:
Label3
Name LblN2
AutoSize True
Text Nota 2:
Label4
Name LblN3
AutoSize True
Text Nota 3:
Label5
Name LblN4
AutoSize True
Text Nota 4:
Label6
Name LblPromedio
AutoSize True
Text Promedio:
Text1
Name TxtAlumno
Text
Text2
Name TxtN1
Text
Text3
Name TxtN2
Text
Text4
Name TxtN3
Text
Text5
Name TxtN4
Text
Text6
Name TxtPromedio
Enabled False
Text
Text7
Name TxtPuntuacion
Enabled False
Text
Command1
Name BtnAceptar
Text &Aceptar
Command2
Name BtnLimpiar
Text &Limpiar
4 etiquetas
3 cajas de texto
1 GroupBox
3 botones de comando
Form1
Name FrmFecha
FormBorderStyle 3-Fixed Dialog
Text Fecha en letras
Label1
Name LblDia
AutoSize True
Text Día:
Label2
Name LblMes
AutoSize True
Text Mes:
Label3
Name LblAnno
AutoSize True
Text Año:
Label4
Name LblFecha
AutoSize True
Text
Text1
Name TxtDia
Text
Text2
Name TxtMes
Text
Command1
Name BtnAceptar
Text &Aceptar
Command2
Name BtnLimpiar
Text &Limpiar
Command3
Name BtnSalir
Text &Salir
End Sub