文件名称:4
下载
别用迅雷、360浏览器下载。
如迅雷强制弹出,可右键点击选“另存为”。
失败请重下,重下不扣分。
如迅雷强制弹出,可右键点击选“另存为”。
失败请重下,重下不扣分。
介绍说明--下载内容均来自于网络,请自行研究使用
描述: 定义表示形状的抽象类及相应的派生类,并实现相关操作符重载。
(1)定义表示形状的抽象类Shape:
添加公有成员函数double Area(),用于计算形状面积;定义为纯虚函数;
添加公有成员函数void Show(),用于显示形状信息,定义为纯虚函数;
定义虚的析构函数;
重载比较操作符:==、>和<,用于比较两个形状面积的大小关系,返回值类型为bool,可以定义为成员函数或友元函数。
-Descr iption: Definition represent the shape abstract class and derived class, and relevant operator overloading. (1) defines the shape abstract class Shape: add a public member function double Area (), is used to calculate the shape of the area defined as a pure virtual function Add public member function void Show () is used to display the shape information, defined as pure virtual function defined virtual destructor overloaded comparison operators: ==> and < for the relationship of the size of the area of two shapes, the return value type bool can be defined as a member function or a friend function.
(1)定义表示形状的抽象类Shape:
添加公有成员函数double Area(),用于计算形状面积;定义为纯虚函数;
添加公有成员函数void Show(),用于显示形状信息,定义为纯虚函数;
定义虚的析构函数;
重载比较操作符:==、>和<,用于比较两个形状面积的大小关系,返回值类型为bool,可以定义为成员函数或友元函数。
-Descr iption: Definition represent the shape abstract class and derived class, and relevant operator overloading. (1) defines the shape abstract class Shape: add a public member function double Area (), is used to calculate the shape of the area defined as a pure virtual function Add public member function void Show () is used to display the shape information, defined as pure virtual function defined virtual destructor overloaded comparison operators: ==> and < for the relationship of the size of the area of two shapes, the return value type bool can be defined as a member function or a friend function.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
4.txt