import java.util.Scanner;
class Cylinder
{
double radius=0;
double height;
double PI=3.14;
void area()
{
. The System OUT .println ( "bottom area of the cylinder is:" + (PI * radius * radius));
}
double volume()
{
return (PI*radius*radius)*height;
}
}
public class App6_1 {
public static void main(String[] args)
{
Cylinder volum = New cylinder ();
Scanner reader=new Scanner(System.in);
. The System OUT .print ( "Please enter the cylinder bottom circle radius:");
volu.radius=reader.nextDouble();
System.out.println();
. System OUT .print ( "Please enter the cylinder high:");
volu.height=reader.nextDouble();
. The System OUT .println ( "bottom circle radius:" + volu.radius);
volu.area ();
. The System OUT .println ( "cylindrical volume:" + volu.volume ());
}
}
operation result: