文件名称:Vehicles
-
所属分类:
- 标签属性:
- 上传时间:2012-11-16
-
文件大小:7.46kb
-
已下载: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
Vehicles/Car.h
Vehicles/Person.cpp
Vehicles/Person.h
Vehicles/Truck.cpp
Vehicles/Truck.h
Vehicles/Vehicle.h
Vehicles/VehicleDriver.cpp
Vehicles/Vehicles.cpp
Vehicles/Vehicles.suo
Vehicles
Vehicles/Car.h
Vehicles/Person.cpp
Vehicles/Person.h
Vehicles/Truck.cpp
Vehicles/Truck.h
Vehicles/Vehicle.h
Vehicles/VehicleDriver.cpp
Vehicles/Vehicles.cpp
Vehicles/Vehicles.suo
Vehicles