文件名称:Vehicles
- 所属分类:
- 其他小程序
- 资源属性:
- [Windows] [Visual.Net] [源码]
- 上传时间:
- 2012-11-26
- 文件大小:
- 7kb
- 下载次数:
- 0次
- 提 供 者:
- 沈**
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
一个关于Vehicle的小程序,带源码,测试可以执行。主要是一个类的继承的练习。-Vehicles
Create a base class called Vehicle that has
• the manufacturer’s name (type string),
• number of cylinders in the engine (type int), and
• owner (type Person, given below).
Define a virtual function Print() to print all the informations of the Vehicle.
Then create a class called Truck that is derive from Vehicle and has additional properties:
the load capacity in tons (type double). Define a Car class that is also derived from the
Vehicle class and has additional properties: bodystyle (type string, e.g. family car, super
car, and concept car).
Create a base class called Vehicle that has
• the manufacturer’s name (type string),
• number of cylinders in the engine (type int), and
• owner (type Person, given below).
Define a virtual function Print() to print all the informations of the Vehicle.
Then create a class called Truck that is derive from Vehicle and has additional properties:
the load capacity in tons (type double). Define a Car class that is also derived from the
Vehicle class and has additional properties: bodystyle (type string, e.g. family car, super
car, and concept car).
(系统自动生成,下载前可以参看下载内容)
下载文件列表
Vehicles\Car.cpp
........\Car.h
........\Person.cpp
........\Person.h
........\Truck.cpp
........\Truck.h
........\Vehicle.h
........\VehicleDriver.cpp
........\Vehicles.cpp
........\Vehicles.suo
Vehicles