Professional Documents
Culture Documents
Diseo:
ComboBox1:
Name: cmbProducto
Items: Refrigeradora/Lavadora/Equipo de Sonido/
Televisor 3D/ Cocina
TextBox1:
Name: txtPrecio
TextBox2:
Name: txtCuotaIni
TextBox3:
Name: txtNroCuota
TextBox4:
Name: txtMonCuota
Button1:
Name: btnCalcular
Text : Calcular
clsVentaCredito
using
using
using
using
using
System;
System.Collections.Generic;
System.Linq;
System.Text;
System.Threading.Tasks;
namespace Laboratorio01_01
{
class clsVentaCredito
{
public double precio;
public int nroCuotas;
public double cuotaInicial;
public double montoCuota;
private double obtenerMontoCredito(){
return (this.precio - this.cuotaInicial);
}
private double obtenerInteres()
{
double interes=0;
if (this.nroCuotas >= 0 && this.nroCuotas <= 6)
interes = 0.10;
if (this.nroCuotas >= 7 && this.nroCuotas <= 12)
interes = 0.20;
if (this.nroCuotas >= 13)
interes = 0.30;
return interes;
Formulario
using
using
using
using
using
using
using
using
using
System;
System.Collections.Generic;
System.ComponentModel;
System.Data;
System.Drawing;
System.Linq;
System.Text;
System.Threading.Tasks;
System.Windows.Forms;
namespace Laboratorio01_01
{
public partial class Form1 : Form
{
clsVentaCredito objVentas = new clsVentaCredito();
public Form1()
{
InitializeComponent();
}
Diseo:
ComboBox1:
Name: cmbCargo
Items: Gerente/Administrador/Contador/Secretaria/
Empleado
TextBox1:
Name: txtSueldo
TextBox2:
Name: txtHijos
Button1:
Name: btnGenerar
Text : Generar Planilla
ClsPlanilla
using
using
using
using
using
System;
System.Collections.Generic;
System.Linq;
System.Text;
System.Threading.Tasks;
namespace Laboratorio01_02
{
class clsPlanilla
{
public int nroHijo;
public int sueldo;
public string generarPlanilla(int mes){
string elemento="";
int xsueldo;
xsueldo=this.sueldo+(this.nroHijo*15);
switch (mes)
{
case 1:
{
elemento = "Enero \t"+ xsueldo.ToString();
break;
}
case 2:
{
elemento = "Febrero \t" + xsueldo.ToString();
break;
}
case 3:
{
elemento = "Marzo \t" + xsueldo.ToString();
break;
}
case 4:
{
elemento = "Abril \t" + xsueldo.ToString();
break;
}
case 5:
{
elemento = "Mayo \t" + xsueldo.ToString();
break;
}
case 6:
{
elemento = "Junio \t" + xsueldo.ToString();
break;
}
case 7:
Formulario
using
using
using
using
using
using
using
using
using
System;
System.Collections.Generic;
System.ComponentModel;
System.Data;
System.Drawing;
System.Linq;
System.Text;
System.Threading.Tasks;
System.Windows.Forms;
namespace Laboratorio01_02
{
public partial class Form2 : Form
{