登录
首页 » Visual C++ » 6_1

6_1

于 2014-10-20 发布 文件大小:4662KB
0 183
下载积分: 1 下载次数: 1

代码说明:

  1. 定义一个抽象学生类CStudent,它具有公有成员函数Average(),该函数用于计算学生的平均分,函数为虚函数;定义一个文科学生类CStudentLiberalArts,它是类CStudent的派生类,并以公有方式派生,它具有的成员有: 1) 保存英语、政治、数学、地理和历史、美术成绩的整形成员变量; 2) 设置上述变量的公有成员函数; 3) 输出上述变量的公有成员函数; 4) 公有的成员函数Average()用于计算学生的平均分; 定义一个理科学生类CStudentScience,它是类CStudent的派生类,并以公有方式派生,它具有的成员为: 1) 保存英语、物理、数学、化学和计算机、程序设计成绩的整形成员变量; 2) 设置上述变量的公有成员函数; 3) 输出上述变量的公有成员函数; 4) 公有的成员函数Average()用于计算学生的平均分; 编写主函数,并测试以下内容: 1) 定义一个CStudent的指针数组pStu,数组长度为4; 2) 动态创建2个文科学生的对象,地址存于pStu数组的0-1个元素内; 3) 动态创建2个理科学生的对象,地址存于pStu数组的2-3个元素内; 4) 利用while循环调用数组里每个元素的计算平均成绩操作; 释放动态分配的空间,确保必要的析构函数能被调用。 (1 define an abstract class student CStudent, it has a public member function Average (), this function is used to calculate the student s average points function as virtual function definition of a liberal arts student class CStudentLiberalArts, it is the class CStudent derived class, and public be derived, which has members are: 1) Save English, shaping member variables politics, mathematics, geography and history, art achievements 2) Set the above variables public member function 3) public member function of the output of the variable 4) public member function Average () is used to calculate the average student s points The definition of a science student class CStudentScience, it is the class CStudent derived class, and public manner derived, which has members as follows: 1) Save English, physics, mathematics, chemistry and computer programming achievement shaping member variables 2) Set the above variables public member function 3) public member function of t)

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • quxiannihe
    求联合概率密度的matlab编程,可用于大部分数学或曲线拟合的场合(Seek the joint probability density)
    2012-06-09 09:44:30下载
    积分:1
  • qxnh00005
    用c++编的matlab曲线拟合程序,都是老师布置的数值分析作业!希望和大家交流.谢谢网站提供这个平台!(c addendum to the use of curve fitting procedures Matlab, Layout of the teachers are numerical analysis operations. We hope and exchanges. Thank you for providing this platform!)
    2006-10-15 20:02:35下载
    积分:1
  • gupiaoshuju
    读取股市中散户,大户,超大户资金进出数量(Read the stock market, individual investors, large, super large amount of money out of)
    2009-12-14 18:15:43下载
    积分:1
  • railroad-rush-hour
    实现火车的调度,即将无需的乱的火车,重新调度成有序的(Realization train scheduling, without the chaos of the train is about to re-scheduled to orderly)
    2014-12-09 19:44:18下载
    积分:1
  • BSpline
    程序实现二次B样条平滑,三次B样条平滑;二次B样条平滑后节点插值(Program to achieve the second B-spline smoothing, cubic B-spline smoothed after the second B-spline interpolation smooth node)
    2014-12-07 23:00:29下载
    积分:1
  • shuzituxiang
    这是一个数字图像处理的matlab仿真程序,效果比较好(This is a digital image processing matlab simulation program, the effect is better)
    2009-03-15 23:07:05下载
    积分:1
  • VC-call-matlab-multiThread
    VC++调用matlab画图,效果很好!值得看(VC++ Call matlab drawing, the effect is very good!)
    2013-09-24 17:30:51下载
    积分:1
  • feijiruanjiakifajishu
    说明:  这是飞机的阮籍开发技术的创新,能够更好的帮助大家学习飞机的控制(feiji)
    2010-04-17 20:35:43下载
    积分:1
  • autorun
    一个使用控制台实现的关于设置开机自启动的小demo。(A realization about using the console to set boot the start of a small demo.)
    2014-09-27 11:01:44下载
    积分:1
  • pso530
    粒子群优化算法(PSO)是一种进化计算技术(evolutionary computation),由Eberhart博士和kennedy博士于1995年提出 (Kennedy J,Eberhart R. Particle swarm optimization.Proceedings of the IEEE International Conference on Neural Networks.1995.1942~1948.)。源于对鸟群捕食的行为研究。粒子群优化算法的基本思想是通过群体中个体之间的协作和信息共享来寻找最优解. (Particle Swarm Optimization (PSO) is an evolutionary computation techniques (evolutionary co mputation) by Dr. Eberhart and kennedy Dr. raised in 1995 (Kennedy, J., Eberhart R. Particle swarm optimization.Proc eedings of the IEEE International Conference o n Neural Networks.1995.1942 ~ 1948.) . From the flock of the predatory behavior. PSO algorithm is the basic idea of individual groups through the sharing of information and collaboration to find the optimal solution.)
    2006-09-08 15:19:54下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载