Last active
August 29, 2015 13:58
-
-
Save comtom/10210287 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package pack; | |
public class Alumno { | |
private String nombre; | |
private String apellido; | |
private int edad; | |
public Alumno(String nombre, String apellido, int edad){ | |
this.nombre = nombre; | |
this.apellido = apellido; | |
this.edad = edad; | |
} | |
@Override public String toString() { | |
return this.getNombreyApellido(); | |
} | |
public void setNombre(String nombre) { | |
this.nombre = nombre; | |
} | |
public void setApellido(String apellido) { | |
this.apellido = apellido; | |
} | |
public void setEdad(int edad) { | |
this.edad = edad; | |
} | |
public String getNombre() { | |
return nombre; | |
} | |
public String getApellido() { | |
return apellido; | |
} | |
public String getNombreyApellido() { | |
return nombre +" "+ apellido; | |
} | |
public int getEdad() { | |
return edad; | |
} | |
public static void main(String[] args) { | |
System.out.println("Ejecute primero el otro, no sea bolu.."); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment