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

6_1

于 2014-10-20 发布 文件大小:4662KB
0 79
下载积分: 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 个回复

  • lab_1-4
    lab 1 matlab ...on wireless sensor networks a very good, very good ah!...////
    2013-03-30 02:42:51下载
    积分:1
  • MATLAB-SimMechanics
    MATLAB-SimMechanics机构动态仿真讲解教程(Dynamic simulation of MATLAB-SimMechanics bodies to explain the tutorial)
    2012-06-27 16:39:36下载
    积分:1
  • Fibonacci2
    Fibonacci问题,sicily 张老师题目(Fibonacci problem, sicily Zhang topic)
    2014-10-11 09:28:12下载
    积分:1
  • 1
    说明:  将Minpack库中的LM算法封装成库,经过调试,通过算例运行结果与Matlab中运行出来的结果相差0.01范围内。(Will Minpack library package into the LM algorithm library,After debugging An example is the results is only 0.01 Difference from the result of Matlab s! )
    2009-08-09 22:15:03下载
    积分:1
  • Xu-White-model
    用C++编写的xu-white模型,适合砂泥岩地层岩石物理建模,很实用(Written by C++ xu-white model, suitable for sand-shale formation rock physics modeling, it is practical)
    2020-12-25 09:59:04下载
    积分:1
  • ga_lm_bp
    4-9-1的结构ga-lm的bp算法 有示例数值 不是拟合而是预测(4-9-1 structure of ga-lm bp algorithm is not fit but there are examples of numerical prediction)
    2013-12-23 21:25:22下载
    积分:1
  • VisualCandmatlab
    vc下如何使用matlab,各种不同方法的介绍 还算详细吧 加油啦大家一起努力(vc matlab)
    2009-12-10 16:15:00下载
    积分:1
  • dissertationlsthesudyofGaborwavel
    本文 主 要 研究的是Gab。:小波神经网络算法及其在灰度图像目标识别 中的应用。研究涉及神经网络理论、小波分析理论和小波神经网络理论及其 它们在目标识别中的应用技术。(This paper is Gab. : Wavelet neural network algorithm and its gray-scale image recognition applications. Research involving neural network theory, wavelet analysis theory and wavelet neural network theory and their recognition in the target application technology.)
    2008-07-19 17:49:32下载
    积分:1
  • matlab
    说明:  matlab课件及程序例讲解以及matlab算法实例文件(PDF)格式(courseware and procedures matlab matlab algorithm cases and practical examples to explain (PDF) format)
    2011-03-24 21:46:33下载
    积分:1
  • VCandMATLAB
    link about Matlab and Vc
    2011-10-25 11:13:26下载
    积分:1
  • 696518资源总数
  • 104269会员总数
  • 42今日下载