Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package app;
- public class Persona {
- private static int lastID = 0;
- private String nombre;
- private int edad;
- public int ejemplo;
- private Direccion miDireccion;
- /**
- * @param nombre
- * @param edad
- * @param ejemplo
- */
- public Persona(String nombre, int edad, int ejemplo, String nombreCalle) {
- this.nombre = nombre;
- this.edad = edad;
- this.ejemplo = ejemplo;
- this.miDireccion = new Direccion(nombreCalle);
- }
- public String getNombreDireccion()
- {
- return miDireccion.getNombreCalle();
- }
- /**
- * @param nombre
- */
- public Persona(String nombre) {
- this.nombre = nombre;
- }
- public static int getLastID()
- {
- return lastID;
- }
- private static void setLastID(int lastID) {
- Persona.lastID = lastID;
- }
- /**
- * @return the nombre
- */
- private String getNombre()
- {
- return nombre;
- }
- /**
- * @param nombre the nombre to set
- */
- public void setNombre(String nombre) {
- this.nombre = nombre;
- }
- /**
- * @return the edad
- */
- public int getEdad() {
- return edad;
- }
- /**
- * @param edad the edad to set
- */
- public void setEdad(int edad) {
- this.edad = edad;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement