fichero_03

This commit is contained in:
Avelino
2026-09-29 12:59:13 +02:00
commit 091c219f61
4 changed files with 242 additions and 0 deletions
@@ -0,0 +1,34 @@
package org.palomafp.aadd.anp.model;
public class Continente {
private String codigoContinente;
private String nombre;
public Continente(String codigoContinente, String nombre) {
this.codigoContinente = codigoContinente;
this.nombre = nombre;
}
public String getCodigoContinente() {
return codigoContinente;
}
public void setCodigoContinente(String codigoContinente) {
this.codigoContinente = codigoContinente;
}
public String getNombre() {
return nombre;
}
public void setNombre(String nombre) {
this.nombre = nombre;
}
@Override
public String toString() {
return
" codigo = " + codigoContinente;
}
}
+62
View File
@@ -0,0 +1,62 @@
package org.palomafp.aadd.anp.model;
public class Pais {
private int id;
private String nombre;
private String capital;
private Continente continente;
public Pais() {
}
public Pais(int id, String nombre, String capital, Continente continente) {
this.id = id;
this.nombre = nombre;
this.capital = capital;
this.continente = continente;
}
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getNombre() {
return nombre;
}
public void setNombre(String nombre) {
this.nombre = nombre;
}
public String getCapital() {
return capital;
}
public void setCapital(String capital) {
this.capital = capital;
}
public Continente getContinente() {
return continente;
}
public void setContinente(Continente continente) {
this.continente = continente;
}
@Override
public String toString() {
return "Pais{" +
"id=" + id +
", nombre = '" + nombre + '\'' +
", capital = '" + capital + '\'' + "," +
continente +
'}';
}
}