
//practica de set y get
class Boxx {

    public float ancho;
    public float largo;
    public float profundidad;
    public float volumen;
/*    public Boxx(int anch,int larg,int prof){
        this.ancho=anch;
        this.largo=larg;
        this.profundidad=prof;
    }
*/
    public void setDatos(float anch,float larg,float prof){
        this.ancho=anch;
        this.largo=larg;
        this.profundidad=prof;
    }
    public void calcularVolumen(){
         this.volumen=ancho*largo*profundidad;
    }

    public float getDatos(){
        
        return this.volumen;
    }
    
}

public class Box{

    public static void main(String[] args) {
        Boxx obj= new Boxx();
        obj.setDatos(2,3,5);
        obj.calcularVolumen();
        System.out.println("Volumen= "+obj.getDatos()+" m2");
    }
}



