Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //MEDICO.CS
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace Medicos
- {
- class Medico
- {
- int matricula;
- string nombre;
- bool sexo;
- DateTime fecha;
- int especialidad;
- double montoConsulta;
- public int pMatricula { set { matricula = value; } get { return matricula; } }
- public string pNombre { set { nombre = value; } get { return nombre; } }
- public bool pSexo { set { sexo = value; } get { return sexo; } }
- public DateTime pFecha { set { fecha = value;} get{return fecha;} }
- public int pEspecialidad { set { especialidad = value; } get { return especialidad; } }
- public double pmontoConsulta { set { montoConsulta = value; } get { return especialidad; } }
- public Medico()
- {
- matricula = 0;
- nombre = "";
- sexo = true;
- fecha = DateTime.Today;
- especialidad = 0;
- montoConsulta = 0;
- }
- public string SexToString()
- {
- if (sexo)
- return "Masculino";
- else
- return "Femenino";
- }
- public string toStringEspecialidad()
- {
- if (especialidad == 1)
- {
- return "Cardiologia";
- }
- else if (especialidad == 2)
- {
- return "Odontologia";
- }
- else if (especialidad == 3)
- {
- return "Pediatria";
- }
- else
- {
- return "Nulo";
- }
- }
- public string toString()
- {
- return "Matricula: " + matricula + "\n" + "Nombre: " + nombre + "\n" + "Sexo: " + SexToString() + "\n" + "Fecha: " + fecha + "\n" + "Especialidad: " + toStringEspecialidad() + "\n" + "Monto de Consulta: " + montoConsulta;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement