文件名称:shiyan
-
所属分类:
- 标签属性:
- 上传时间:2012-11-16
-
文件大小:29.07kb
-
已下载:0次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
实验五 类的继承实验3.编写一个基类Shape,在此基础上派生出类Triangle和Circle,二者都有计算对象面积的函数GetArea( )和计算对象周长的函数GetPerim()。
4.开发一个简单的大学人员管理程序,该程序可以管理大学的一些基本人员:学生(student)、教师(teacher)、教授(professor)。首先设计一个虚基类person。通过该类保存人员的最基本信息:姓名(name)、年龄(age)和性别(sex)。然后使用该类派生出学生类student和教师类teacher,在其中添加各自的特性,如在student类中添加如下信息:专业(speciality),在teacher类中添加院系(department)等。还有部分教师在工作的同时在职修读学位,因此同时具有教师和学生双重身份,所以由student类和teacher类再次派生出stuTeacher类。为每个类定义一个输出函数print(),输出该类相关信息。
5.简易银行账户系统,银行帐户类派生出定期储户类和信用卡类。(选作)
-Experimental class inheritance experiments.Write a base class Shape, on the basis of the derived classes Triangle and Circle, both to calculate the function of the object area GetArea () function to calculate the object perimeter GetPerim ().
4. Develop a simple university personnel management program, the program can manage the University some of the basic staff: students (student) teachers (teacher), professor (professor). First, the design of a virtual base class person Show. Class to save the most basic information: name (name), age (age) and gender (sex). Derived student class student and teacher class teacher and then use the class in which to add their own features, such as in the student class, add the following information: professional (speciality), added in the teacher class faculty (department). There are some teachers in the work at the same time are pursuing a degree, so also has the dual capacity of teachers and students, so again by the student class and the teacher cl
4.开发一个简单的大学人员管理程序,该程序可以管理大学的一些基本人员:学生(student)、教师(teacher)、教授(professor)。首先设计一个虚基类person。通过该类保存人员的最基本信息:姓名(name)、年龄(age)和性别(sex)。然后使用该类派生出学生类student和教师类teacher,在其中添加各自的特性,如在student类中添加如下信息:专业(speciality),在teacher类中添加院系(department)等。还有部分教师在工作的同时在职修读学位,因此同时具有教师和学生双重身份,所以由student类和teacher类再次派生出stuTeacher类。为每个类定义一个输出函数print(),输出该类相关信息。
5.简易银行账户系统,银行帐户类派生出定期储户类和信用卡类。(选作)
-Experimental class inheritance experiments.Write a base class Shape, on the basis of the derived classes Triangle and Circle, both to calculate the function of the object area GetArea () function to calculate the object perimeter GetPerim ().
4. Develop a simple university personnel management program, the program can manage the University some of the basic staff: students (student) teachers (teacher), professor (professor). First, the design of a virtual base class person Show. Class to save the most basic information: name (name), age (age) and gender (sex). Derived student class student and teacher class teacher and then use the class in which to add their own features, such as in the student class, add the following information: professional (speciality), added in the teacher class faculty (department). There are some teachers in the work at the same time are pursuing a degree, so also has the dual capacity of teachers and students, so again by the student class and the teacher cl
(系统自动生成,下载前可以参看下载内容)
下载文件列表
shiyan/3_ti.cpp
shiyan/4_ti.cpp
shiyan/5_ti.cpp
shiyan/实验五 类的继承实验.doc
shiyan
shiyan/4_ti.cpp
shiyan/5_ti.cpp
shiyan/实验五 类的继承实验.doc
shiyan
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.