-
Notifications
You must be signed in to change notification settings - Fork 0
/
Estudiante.cs
59 lines (42 loc) · 1.52 KB
/
Estudiante.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
using System;
public class Estudiante
{
public String nombre { get; set; }
public int matricula { get; set; }
public String materia { get; set; }
public float calificacion { get; set; }
public String estado { get; set; }
public Estudiante()
{
this.nombre = "";
this.matricula = 0;
this.materia = "";
this.calificacion = 0;
this.estado = "";
}
public Estudiante(String nombre, int matricula, String materia, float calificacion, String estado)
{
this.nombre = nombre;
this.matricula = matricula;
this.materia = materia;
this.calificacion = calificacion;
this.estado = estado;
}
public void mostrar()
{
Console.WriteLine("-----------------------------------");
Console.Write("\n >>Nombre: ");
nombre = Convert.ToString(Console.ReadLine());
Console.Write("\n >>Matricula: ");
matricula = Convert.ToInt32(Console.ReadLine());
Console.Write("\n >>Materia: ");
materia = Convert.ToString(Console.ReadLine());
Console.Write("\n >>Calificacion: ");
calificacion = Convert.ToSingle(Console.ReadLine());
if (calificacion >= 60)
estado = "Aprobado";
else
estado = "Reprobado";
}
}