⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cylinder2.h.bak

📁 用三个类来研究类的继承!类Point、Circle、Cylinder
💻 BAK
字号:
//cylinder2.h
//类Cylinder的定义
#ifndef cylinder2_h
#define cylinder2_h

class Cylinder: public Circle{
	friend ostream &operator<< (ostream &output, const Cylinder &);
public:
	//默认构造函数
	Cylinder(float h=0.0, float r=0.0, float x=0.0, float y=0.0);
	void setHeight(float);	//设置高的值
	float getHeight() const;	//读取高的值
	float area() const;	//计算并返回圆柱体的表面积
	float volume const;	//计算并返回圆柱体的体积
protected:
	float height;	//圆柱体的高度
};

#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -