// class volume to find the volume of a cube and a cuboid
//the side of the cube is =>1 and =<30

public class Volume
{
	private int cubeVolume;
	private int cuboidVolume;
	
	//constructor 
	public Volume (int x)
	{
		setCubeVolume(x);
	}
	
	// constructor 
	
	public Volume (int x , int y, int z)
	{
		setCuboidVolume(x,y,z);
	}
	
	//method to set the volume of a cube
	
	public void setCubeVolume(int x)
	{
		if (x>=1 && x<=30)
		{
			cubeVolume=3*x;
		}
		else 
		{
			System.out.println("Number between 1 to 30");
			cubeVolume=0;
		}
		
	}
	
	// method to set the volume of a coboid
	
	public void setCuboidVolume(int x,int y, int z)
	{
		cuboidVolume=x*y*z;
	}
	
	// method to get the volume of a cube
	
	public int getCubeVolume()
	{
		return cubeVolume;
	}
	
	//method to get the volume of a cuboid
	
	public int getCuboidVolume()
	{
		return cuboidVolume;
	}
	
}								