文件名称: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 |
1999-2046 搜珍网 All Rights Reserved.
本站作为网络服务提供者,仅为网络服务对象提供信息存储空间,仅对用户上载内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。
