-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathEstudiante.java
More file actions
165 lines (128 loc) · 3.88 KB
/
Copy pathEstudiante.java
File metadata and controls
165 lines (128 loc) · 3.88 KB
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
public class Estudiante
{
private String codigo;
private String nombre;
private String telefono;
private String email;
private String direccion;
private Integer edad;
private String documento;
private String tipoDocumento;
private Integer creditosCursados;
private Integer semestresCursados;
private String estado;
private Carrera carrera;
public Estudiante (){
}
public Estudiante( String codigo, String nombre,String telefono,String email,String direccion,Integer edad,String documento,String tipoDocumento,Integer creditosCursados,Integer semestresCursados,
String estado,Carrera carrera){
this.codigo=codigo;
this.nombre=nombre;
this.telefono=telefono;
this.email=email;
this.direccion=direccion;
this.edad=edad;
this.documento=documento;
this.tipoDocumento=documento;
this.creditosCursados=creditosCursados;
this.semestresCursados=semestresCursados;
this.estado=estado;
this.carrera=carrera;
}
//GETTER
public String getCodigo(){
return this.codigo;
}
public String getNombre(){
return this.nombre;
}
public String getTelefono(){
return this.telefono;
}
public String getEmail(){
return this.email;
}
public String getDireccion(){
return this.direccion;
}
public Integer getEdad(){
return this.edad;
}
public String getDocumento(){
return this.documento;
}
public String getTipoDocumento(){
return this.tipoDocumento;
}
public Integer getCreditosCursados(){
return this.creditosCursados;
}
public Integer getSemestresCursados(){
return this.semestresCursados;
}
public String getEstado(){
return this.estado;
}
//SETTER
public void setCodigo(String codigo){
this.codigo=codigo;
}
public void setNombre(String nombre){
this.nombre=nombre;
}
public void setTelefono(String telefono){
this.telefono=telefono;
}
public void setEmail(String email){
this.email=email;
}
public void setDireccion(String direccion){
this.direccion=direccion;
}
public void setEdad(Integer edad){
this.edad=edad;
}
public void setDocumento(String documento){
this.documento=documento;
}
public void setTipoDocumento(String tipoDocumento){
this.tipoDocumento=tipoDocumento;
}
public void setCreditosCursados(Integer creditosCursados){
this.creditosCursados=creditosCursados;
}
public void getSemestresCursados(Integer semestresCursados){
this.semestresCursados=semestresCursados;
}
public void setEstado(String estado){
this.estado= estado;
}
//METODOS ANALIZADORES
public void esMayorEdad(){
if(getEdad() >= 18){
System.out.println("El estudiante es mayor de edad.");
}
else { System.out.println("El estudiante es menor de edad."); }
}
public void cursoTotalCreditos()
{
if(getCreditosCursados()>=carrera.getNumeroCreditos()){
System.out.println("Estas a un paso de obtener el titulo.");
}
}
public void matricularProyecto(){
if(getCreditosCursados()>=(carrera.getNumeroCreditos()*0.7)&& getSemestresCursados()>7)
{
System.out.println("Usted ya puede matricular proyecto de grado");}
}
public void mostrarCreditos(){
Float promedio=(float)(getCreditosCursados()/getSemestresCursados());
System.out.println("El promedio de creditos cursados es: " + promedio);
}
public void actualizarEstado(){
if (getSemestresCursados()>=carrera.getSemestre()*2)
{
this.estado ="PFU";
}
}
}