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

#ifndef CONE_H
#define CONE_H

#include <iostream>

using namespace std;

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

public:
	cone();
	cone(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

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

}

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

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

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

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

int cone::getY()
{
	return y;	
}


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

void cone::setHeight(double h)
{
	height = h;	
}
*/

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


double cone::volume() 
{
	return cylinder::area() /3;
}