-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathEstudiante.java
42 lines (33 loc) · 874 Bytes
/
Estudiante.java
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
public class Estudiante extends Socio{
private String carrera;
/**
* Constructor de la clase estudiante
*/
public Estudiante(int p_dniSocio, String p_nombre, String p_carrera){
super(p_dniSocio, p_nombre,20);
this.setCarrera(p_carrera);
}
private void setCarrera(String p_carrera){
this.carrera = p_carrera;
}
public String getCarrera(){
return this.carrera;
}
/**
* Verifica si es posible o no volver a realizar otro prestamo
*/
@Override
public boolean puedePedir(){
if(super.puedePedir() && getPrestamos().size() <= 3){
return true;
}else{
return false;
}
}
/**
* Devuelve que es un tipo de socio Estudiante
*/
public String soyDeLaClase(){
return "Estudiante";
}
}