Está en la página 1de 1

using System;

using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace WindowsFormsApplication1
{
class Docente:Class_Persona
{
//definir atributos de la clase
//titulo 4to nivel, titulo 3er nivel, fecha de ingreso, fecha salida,
status(Activo-Inactivo)
private string _titulopost;
private string _tituloUniversidad;
private DateTime _fechaingreso;
private DateTime _fechasalida;
private int _status;

//Métodos para obtener y asignar información


private string titulopost
{
get { return _titulopost;} //Obtener datos del atributo
set { _titulopost = value; } //Asignar un valor al atributo
}
private string tituloUniversidad
{
get { return _tituloUniversidad;} //Obtener datos del atributo
set { _tituloUniversidad = value; } //Asignar un valor al atributo
}
private DateTime fechaingreso
{
get { return _fechaingreso;} //Obtener datos del atributo
set { _fechaingreso = value; } //Asignar un valor al atributo
}
private DateTime fechasalida
{
get { return _fechasalida;} //Obtener datos del atributo
set { _fechasalida = value; } //Asignar un valor al atributo
}
private int status
{
get { return _status; } //Obtener datos del atributo
set { _status = value; } //Asignar un valor al atributo
}
//metodo para calcular los años en la institución
//método si el status es activo
public int anioinstitucion(DateTime fechaingreso)
{
int anios = 0;
anios = DateTime.Now.Year - fechaingreso.Year;
return anios;
}
//status si es inactivo
public int anioinstitucion(DateTime fechaingreso, DateTime fechasalida)
{
int anios = 0;
anios = fechasalida.Year - fechaingreso.Year;
return anios;
}
//definir el constructor de la clase
public Docente()
{
titulopost = "";
tituloUniversidad = "";
fechaingreso = new DateTime(1000, 01, 01);
fechasalida = new DateTime(1000, 01, 01);
status = 0;
}
}
}

También podría gustarte