int radius;
point center;
};
#endif
【说明】圆的类定义与实现。继承shape类的行为。
#ifndef line_h
#define line_h
#include "shape.h"
#include "point.h"
class line : public shape
{
public:
void input()
{
cout << endl << "输入直线的参数";
cout << endl << "输入端点1的坐标:" << endl;
point1.put();
cout << endl << "输入端点2的坐标:" << endl;