class Circle { protected double radius; public Circle(double r){ radius=r; } public double getArea(){ return Math.PI*radius*radius; } } class Cylinder extends Circle{ private double height; public Cylinder(double r, double h){ super(r); height = h; } public double getVolume(){ return super.getArea()*height; } } public class Main { public static void main(String[] args) { Cylinder c = new Cylinder(5.0,10.0); System.out.println(c.getArea()); System.out.print(c.getVolume()); } }