// Filename: cylinder.h
// Author: G. Safko  <greg.safko@gmail.com>
// Description: a cylinder object
// Date Written: April 26, 2005

#ifndef CYLINDER_H
#define CYLINDER_H

#include <iostream>

using namespace std;

class cylinder : public circle // cylinder inherits from point
{
private:
	//int x,y;
	double height;

public:
	cylinder();
	cylinder(int x, int y, double rad, double ht);

	// mutators
	//void setX(int);
	//void setY(int);
	//void setRadius(double);
	void setHeight(double);
	
	// accessors
	//int getX(void);
	//int getY(void);
	double getHeight(void);
	virtual void printName() const;

};

#endif

cylinder::cylinder() :circle(0,0,0) // default constructor
{
	height = 0;

}

cylinder::cylinder(int x, int y, double r, double h) : circle(x,y,r)
{
	
	height = h;
	
}

/*
void cylinder::setX(int x1)
{
	x = x1;
}

void cylinder::setY(int y1)
{
	y = y1;
}

int cylinder::getX()
{
	return x;	
}

int cylinder::getY()
{
	return y;	
}
*/

double cylinder::getHeight()
{
	return height;	
}

void cylinder::setHeight(double h)
{
	height = h;	
}

void cylinder::volume()
{
	return 3.1415 * radius * radius * height;
}


void cylinder::printName() const
{
	cout << "cylinder\n";
}
