Good the problem that I am having is that basically the program consists of a team of basketball where each player has a certain position in which he plays, for it I defined a enum
, the theme is that now I want to use it in the constructor but I can not.
I do not know how to assign each position to each player I create.
public class Jugador{
private long cedula;
private String nombre;
private int edad;
private int aniosExperiencia;
enum posicion{BASE,ESCOLTA,ALERO,ALA_PIVOT,PIVOT};
public Jugador(String nombre, long cedula , int edad){
this.nombre=nombre;
this.cedula=cedula;
this.edad=edad;
}
public Jugador(String nombre, long cedula , int edad, int aniosExperiencia){
this.nombre=nombre;
this.cedula=cedula;
this.edad=edad;
this.aniosExperiencia=aniosExperiencia;
}
public String getNombre(){
return nombre;
}
public int getEdad(){
return edad;
}
public long getCedula(){
return cedula;
}
public void dimeNombre(String nombre){
this.nombre=nombre;
}
public void dimeEdad(int edad){
this.edad=edad;
}
public void dimeCedula(long cedula){
this.cedula=cedula;
}
}