//filename:Cylinder.java
interface Face1
{
final double PI=3.14;
abstract double area();
}
interface Face2
{
abstract void setColor(string c);
}
interface Face3 extends Face1,Face2
}
abstract void volume;
}
public class Cylinder implements Face3
{
private double radius;
private int height;
protected string color;
public Cylinder(double r,int h)
{
radius=r;
height=h;
}
public double area()
{
return PI*radius*radius;
}
public void setColor(String c)
{
color=c;
System.out.println(":"=color);
}
public void volume()
{
System.out.println("="+area()*height);
}
public static void main(String[]args)
{
Cylinder volu=new Cylinder(8.0,2);
volu.setColor("");
volu.volume();
}
}