VOs con constructores
This commit is contained in:
parent
8c47a2ed9e
commit
1314216578
@ -40,5 +40,6 @@
|
||||
<attribute name="m2e-apt" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/5"/>
|
||||
<classpathentry kind="output" path="target/classes"/>
|
||||
</classpath>
|
||||
|
||||
@ -23,6 +23,19 @@ public class Alumno {
|
||||
|
||||
|
||||
|
||||
public Alumno(int identificador, String nombre, String apellido1, String apellido2, LocalDate fechaNacimiento,
|
||||
String esRepetidor, String telefono, Casa casa) {
|
||||
super();
|
||||
this.identificador = identificador;
|
||||
this.nombre = nombre;
|
||||
this.apellido1 = apellido1;
|
||||
this.apellido2 = apellido2;
|
||||
this.fechaNacimiento = fechaNacimiento;
|
||||
this.esRepetidor = esRepetidor;
|
||||
this.telefono = telefono;
|
||||
this.casa = casa;
|
||||
}
|
||||
|
||||
public int getIdentificador() {
|
||||
return identificador;
|
||||
}
|
||||
|
||||
@ -13,6 +13,12 @@ public class Casa {
|
||||
private int identificador;
|
||||
String nombre;
|
||||
|
||||
public Casa(int identificador, String nombre) {
|
||||
super();
|
||||
this.identificador = identificador;
|
||||
this.nombre = nombre;
|
||||
}
|
||||
|
||||
public int getIdentificador() {
|
||||
return identificador;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user