public class Mueble{
	
	//Atributos
	private String nombre;
	private String material, color, textura;
	private float alto, ancho, largo, peso=10;	
	private double x,y,z;

	//Metodos constructores
	public Mueble(){ 
		x=10;
		y=10;
		z=5;
		alto=50;
		ancho=80;
		largo=20;
	}
	
	public Mueble(double a, double b, double c, float e, float f,float g){ 
		x=a;
		y=b;
		z=c;
		alto=e;
		ancho=f;
		largo=g;
	}

	//Metodos get
	public String getColor(){ return color;}
	public double getX(){ return x;}
	public double getY(){ return y;}
	public double getZ(){ return z;}

	//Metodos set
	public void setColor(String str){
		color=str;
	}
	public void setAlto(float f){
		alto=f;
	}
	public void setAncho(float f){
		ancho=f;
	}
	public void setLargo(float f){
		largo=f;
	}
	public void setPeso(float f){
		peso=f;
	}
	public void setNombre(String abc){ 
		nombre=abc;
	}
	public void setMaterial(String m){ 
		material=m;
	}
	public void setTextura(String t){ 
		textura=t;
	}
		
	
	//Metodos otros
	public boolean mover(double ix, double iy, double iz){ 
		if( (x+ancho+ix<=100 )&&(y+largo+iy<=100)&&
			(z+alto+iz<=100)&&(ix+z>=0 )&&
			(iy+x>=0)&&(iz+z>=0)){
			x=x+ix;
			y=y+iy;
			z=z+iz;		  	
			return true;
		}
		else
			return false;
	}
	
	// redefinicion del metodo toString de Object
	public String toString(){
  		String aux;
  		aux = "------------------------------------------------\n";
  		aux = aux +"alto:"+alto+" ancho:"+ancho+" largo:"+largo+"\n";
   		aux = aux +"peso:"+peso+" x:"+x+" y:"+y+" z:"+z+"\n";
   		aux = aux +"nombre:"+nombre+" material:"+material+"\n";
   		aux = aux +"textura:"+textura+" color"+color+"\n";
   		return aux;
  	}
}

	
	