class Cone2 {
    Circle2 base;
    double height;
    
    public Cone2(Circle2 base, double height) {
        this.base = base;
        this.height = height;
    }
    
    public Cone2(double radius, double height) {
        this(new Circle2(radius), height);
    }
    
    double getVolume() {
        return base.getArea() * height / 3.0;
    }
    
    double getSurface() {
        double det = Math.sqrt(Math.pow(height, 2) + Math.pow(base.radius, 2));
        return Math.PI * base.radius * det + base.getArea();
    }
    
    void setRadius(double radius) {
        base.setRadius(radius);
    }
    
    void setHeight(double height) {
        this.height = height;
    }
    
    void print() {
        base.print();
        System.out.println("height = " + height);
        System.out.println("volume = " + getVolume());
        System.out.println("surface = " + getSurface());
    }
}
