文件名称:class
介绍说明--下载内容均来自于网络,请自行研究使用
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