Cylinder类中有私有成员变量radius、height等,有一个无参的构造方法、一个有参的构造方法

Cylinder类中有私有成员变量radius、height等,有一个无参的构造方法、一个有参的构造方法(调用无参的构造方法),有两个以上的成员方法computeArea、computeVolume等。

class Cylinder
{
    private float radius;
    private float height;
    public Cylinder() {}
    public Cylinder(float r,float h) {radius = r;height = h;}
    public float computeArea() {return 2*3.1415926*r*r + 2*3.1415926*r*h;}
    public float computeVolume() {return 3.14159*r*r*h;}
}