文件名称: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 |
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.