import java.io.*;
public class Choices
{
	public static void main(String [] args) throws IOException
	{
		int choice;

		BufferedReader input=new BufferedReader(new InputStreamReader(System.in));
		System.out.print("\n1 for Cylinder");
		System.out.print("\n2 for Rectangle");
		System.out.print("\n3 for Sphere");
		System.out.print("\n\t\tYour Pick: ");
		choice = Integer.parseInt(input.readLine());
		if (choice==1)
		{
			double height;
			double radius;
			System.out.print("\nWhat is the height: ");
			height=Double.parseDouble(input.readLine());
			System.out.print("\nWhat is the radius: ");
			radius=Double.parseDouble(input.readLine());
			Cylinder myCylinder = new Cylinder(height, radius);
			System.out.print("\n1 to get height");
			System.out.print("\n2 to get radius");
			System.out.print("\n3 to get volume");
			System.out.print("\n\t\tYour Pick: ");
			choice = Integer.parseInt(input.readLine());
			if (choice==1)
			System.out.println("The height of this Cylinder is: "+myCylinder.heightCylinder());
			else if (choice==2)
			System.out.println("The radius of this Cylinder is: "+myCylinder.radiusCylinder());
			else if (choice==3)
			System.out.println("The volume of this Cylinder is: "+myCylinder.volumeCylinder());
		}
		else if (choice==2)
		{
			double length;
			double width;
			System.out.print("\nWhat is the length: ");
			length=Double.parseDouble(input.readLine());
			System.out.print("\nWhat is the width: ");
			width=Double.parseDouble(input.readLine());
			Rectangle myRectangle=new Rectangle(length, width);
			System.out.print("\n1 to get length");
			System.out.print("\n2 to get width");
			System.out.print("\n3 to get area");
			System.out.print("\n\t\tYour Pick: ");
			choice = Integer.parseInt(input.readLine());
			if (choice==1)
			System.out.println("The length of this Rectangle is: "+myRectangle.lengthRectangle());
			else if (choice==2)
			System.out.println("The width of this Rectangle is: "+myRectangle.widthRectangle());
			else if (choice==3)
			System.out.println("The area of this Rectangle is: "+myRectangle.areaRectangle());
		}
		else if (choice==3)
		{
			double radius;
			System.out.print("\nWhat is the radius: ");
			radius=Double.parseDouble(input.readLine());
			Sphere mySphere=new Sphere(radius);
			System.out.print("\n1 to get radius");
			System.out.print("\n2 to get area");
			System.out.print("\n\t\tYour Pick: ");
			choice = Integer.parseInt(input.readLine());
			if (choice==1)
			System.out.println("the radius of this Sphere is: "+mySphere.radiusSphere());
			else if (choice==2)
			System.out.println("the area of this Sphere is: "+mySphere.areaSphere());
		}
	}
}