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

📄 fig5_8.cpp.bak

📁 用三个类来研究类的继承!类Point、Circle、Cylinder
💻 BAK
字号:
//fig5_8.cpp
//类Circle的测试程序
#include <iostream.h>
#include <assert.h>
#include "circle2.h"

main()
{
	Circle c(2.5, 3.7, 4.3);

	cout<<"X coodinate is "<<c.getX()
		<<"\nY coodinate is "<<c.getY()
		<<"\nRadius is "<<c.getRadius();

	c.setRadius(4.25);
	c.setPoint(2, 2);
	
	cout<<"\n\nThe new location and radius of c are \n"
		<<c<<"\narea:"<<c.area()<<endl;

	Point *pRef=c;
	cout<<"\nCircle print as a point is: "
		<<pRef<<endl;

	return 0;
}

⌨️ 快捷键说明

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