public string Getnombre()
public Persona(string newnombre,int newedad)
public class empleado : Persona
public string Gettrabajo()
public string Getcarrera()
public empleado(string newnombre,int newedad, string newtrabajo, string newcarrera) : base(newnombre, newedad)
this.carrera = newcarrera;
this.trabajo = newtrabajo;
public class estudiante : Persona
public string Getestudios()
public estudiante(string newnombre,int newedad, int newcarnet, string newestudios) : base(newnombre, newedad)
this.estudios = newestudios;
public class universitario : estudiante
public string Getuniversidad()
public string Getcarrera()
public string[] Getmateria()
public float[] Getnotas()
public universitario(string newnombre,int newedad, int newcarnet, string newestudios, string[] newmateria, float[] newnotas, string newuniversidad, string newcarrera ) : base(newnombre, newedad, newcarnet, newestudios)
this.materia = newmateria;
this.universidad = newuniversidad;
this.carrera = newcarrera;
public class ingenieria : universitario
public string Getnameproyect()
public int Gethorascomp()
public ingenieria(string newnombre,int newedad, int newcarnet, string newestudios, string[] newmateria, float[] newnotas, string newuniversidad, string newcarrera, string newnameproyect, int newhoras, int newhorascomp) : base(newnombre, newedad, newcarnet, newestudios, newmateria, newnotas, newuniversidad, newcarrera)
this.nameproyect = newnameproyect;
this.horascomp = newhorascomp;
public static ingenieria[] ingenieria = new ingenieria[3];
public static void Main()
Console.WriteLine("::Bienvenido::");
Console.WriteLine(":MENU:");
Console.WriteLine("1. Crear los estudiantes de ingenieria");
Console.WriteLine("2. Universidad con mayor numero de estudiantes de ingenieria");
Console.WriteLine("3. Promedio de notas de los estudiantes");
Console.WriteLine("0. Salir");
Console.WriteLine("Ingrese opcion:");
int option = Int32.Parse(Console.ReadLine());
for (int o= 0 ; o < 3; o++)
Console.WriteLine("INGRESE LOS SIGUIENTES DATOS PARA EL NUEVO ESTUDIANTE DE INGENIERIA");
Console.WriteLine("nombre:");
string nombre= Console.ReadLine();
Console.WriteLine("edad");
int edad = Int32.Parse(Console.ReadLine());
Console.WriteLine("carnet");
int carnet = Int32.Parse(Console.ReadLine());
Console.WriteLine("estudios ( pregrado, postgrado, maestria");
string estudios= Console.ReadLine();
Console.WriteLine("Materias");
Console.WriteLine("Ingrese el numero de materias");
int x = Int32.Parse(Console.ReadLine());
string[] newmateria = new string[x];
for (int i= 0 ; i < x; i++)
Console.WriteLine("Ingrese el nombre de la materia " + i+1 );
newmateria[i] = Console.ReadLine();
Console.WriteLine("notas");
float[] newnotas = new float[x];
for (int i= 0 ; i < x; i++)
Console.WriteLine("Ingrese la nota para la materia " + i+1 );
newnotas[i] = float.Parse(Console.ReadLine());
Console.WriteLine("Universidad:");
string universidad= Console.ReadLine();
Console.WriteLine("Carrera:");
string carrera= Console.ReadLine();
Console.WriteLine("Nombre del proyecto:");
string newnameproyect= Console.ReadLine();
Console.WriteLine("Duracion de la pasantia");
int horas = Int32.Parse(Console.ReadLine());
Console.WriteLine("numero de horas completadas");
int horascomp = Int32.Parse(Console.ReadLine());
ingenieria temporal = new ingenieria(nombre, edad, carnet, estudios, newmateria, newnotas, universidad, carrera, newnameproyect, horas, horascomp);
ingenieria[o] = temporal;
Console.WriteLine("ADIOS");
Console.WriteLine("Opcion incorrecta");
Console.WriteLine("::Hasta pronto::");
public static void Showver()
Console.WriteLine("::::::::::::::::::::::::::::::::Acuaticos:::::::::::::::::::::::::::::::");
for (int i = 0 ; i < 3 ; i++)
Console.WriteLine("Vehiculo numero ", + i);
Console.WriteLine("Color " + ingenieria[i].Getnombre());
Console.WriteLine("Modelo " + ingenieria[i].Getuniversidad());