文件名称:class
-
所属分类:
- 标签属性:
- 上传时间:2012-11-16
-
文件大小:45.13kb
-
已下载:1次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
1. 编写程序,定义一个人员类CPerson,包括数据成员:姓名、编号、性别和用于输入、输出的成员函数。在此基础上派生出学生类Cstudent(增加成绩)和教师类Cteacher(增加教龄),并实现对学生和教师信息的输入、输出。
2. 编写程序,设计一个汽车类vehicle,包含的数据成员有车轮个数wheels和车重weigh,带参数的构造函数、拷贝构造函数、数据成员设置函数Set()、数据成员显示函数show()。
小车类car是vehicle的派生类其中包含载人数passenger_load。
卡车类truck是vehicle的派生类其中包含载人数passenger_load和载重量payload。
每个类都有相关数据的输出方法。
-A. Write a program, define a personnel class to CPerson, including the data members: name, number, gender, and member functions for input and output. Derived on this basis the students the class Cstudent (increase results) and teachers class Cteacher (increasing seniority), and students and teachers, information input and output. Two. Write programs, design a car class vehicle, including the data members of wheel re-weigh the number of wheels and car, with the parameters of the constructor, copy constructor, data member set function Set (), data members of the display function show (). The car class car is a vehicle derived class which contains manned number passenger_load program. The truck of the truck class derived class of vehicle which contains the manned the number passenger_load and the load of the payload. Each class has a data output method.
2. 编写程序,设计一个汽车类vehicle,包含的数据成员有车轮个数wheels和车重weigh,带参数的构造函数、拷贝构造函数、数据成员设置函数Set()、数据成员显示函数show()。
小车类car是vehicle的派生类其中包含载人数passenger_load。
卡车类truck是vehicle的派生类其中包含载人数passenger_load和载重量payload。
每个类都有相关数据的输出方法。
-A. Write a program, define a personnel class to CPerson, including the data members: name, number, gender, and member functions for input and output. Derived on this basis the students the class Cstudent (increase results) and teachers class Cteacher (increasing seniority), and students and teachers, information input and output. Two. Write programs, design a car class vehicle, including the data members of wheel re-weigh the number of wheels and car, with the parameters of the constructor, copy constructor, data member set function Set (), data members of the display function show (). The car class car is a vehicle derived class which contains manned number passenger_load program. The truck of the truck class derived class of vehicle which contains the manned the number passenger_load and the load of the payload. Each class has a data output method.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
class.doc
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.