文件名称:c++实验
介绍说明--下载内容均来自于网络,请自行研究使用
定义一个车(vehicle)基类,有Run、Stop等成员函数,由此派生出自行车(bicycle)类、汽车(motorcar) 类,从bicycle和motorcar派生出摩托车(motorcycle)类,它们都有Run、Stop等成员函数。观察虚函数的作用。对实验二中的people类重载“==”运算符和“=”运算符,“==”运算符判断两个people类对象的id属性是否相等;“=”运算符实现people类对象的赋值操作。(Define a car (vehicle) base class, with Run, Stop and other member functions, derived from the bicycle (bicycle) class, car (motorcar) class, derived from bicycle and motorcar motorcycle (motorcycle) class, they all have Run, Stop and other member functions. Observe the function of virtual function. The people class overload "on the second experiment and the = =" operator "=" operator "= =" operator to judge ID properties of two people class objects are equal; "=" operator to achieve the object of the people class assignment.)
相关搜索: C++
(系统自动生成,下载前可以参看下载内容)
下载文件列表
文件名 | 大小 | 更新时间 |
---|---|---|
lab5_3.cpp | 1042 | 2017-11-01 |
C++程序设计实验指导书2017.doc | 103424 | 2017-09-28 |