#include <iostream>
using namespace std;


class Circle
{
private:
	float radius,area;
public :
	void setRadius(void);
	float getArea(void);
	Circle(void);
	~Circle(void);
};

void Circle ::setRadius(void)
{
	cout << "Enter radius of circle : ";
	cin >> radius;
}
float Circle ::getArea(void)
{
	area = 3.142 * radius * radius;
	return area;
}

Circle ::Circle(void)
{
}
Circle ::~Circle(void)
{
}
class Cylinder : public Circle
{
private :
	float length, volume;
public :
	void setLength(void);
	float calcVolume(void);
	Cylinder(void);
	~Cylinder(void);
};

void Cylinder :: setLength(void)
{
	cout << "Enter the length of the cylinder : ";
	cin >> length;
}

float Cylinder :: calcVolume(void)
{
	float area;
	area = getArea();
	volume = area * length; 
	return volume;
}
Cylinder ::Cylinder(void) 
{	
}
Cylinder ::~Cylinder(void)
{
}

void main (void)
{
	Cylinder myCylinder;
	float volume;
	myCylinder.setRadius();
	myCylinder.setLength();
	volume = myCylinder.calcVolume();
	cout << "volume of cylinder is " << volume << endl;
}