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

6_1

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

  • PCA
    在WINDOWS环境下,使用MATLAB写的PCA代码,移植性好,对于做PCA的能方便使用!(In the WINDOWS environment, the use of PCA written in MATLAB code, portability, and for doing the PCA can easily use!)
    2013-09-14 17:13:24下载
    积分:1
  • mvdr.rar-mvdr
    this is the matlab algorithm for mvdr beam forming
    2014-04-26 00:44:12下载
    积分:1
  • MeshfreeVIE
    该论文介绍了电磁场积分方程的无网格数值计算方法,传统的体积分数值计算都需要进行网格剖分,网格剖分的好坏直接影响着数值计算的速度和精度,很多精细结构很难用网格来模拟,无网格技术可以很好地解决此类问题!(This paper describes the meshless numerical method electromagnetic integral equations, numerical integration of traditional body calculations require meshing, meshing a direct impact on the speed and accuracy of numerical calculation, many very fine structure difficult to simulate with the grid, no grid can solve this problem!)
    2014-12-18 15:23:31下载
    积分:1
  • weather-radar
    与气象雷达有关的书籍,对初学者有很大的帮助。(With weather radar related books, a great help for beginners.)
    2011-11-16 23:07:04下载
    积分:1
  • Memory_2005
    介绍了关于memory的相关函数,对于大多数程序员有很大帮助,希望大家多多使用(the information about memory)
    2013-10-11 11:26:50下载
    积分:1
  • pcm
    本文基于MATLAB/SIMULINK动态仿真环境,以实例阐述了建立脉冲编码调制通信系统仿真模型的一般方法。根据该系统的基本原理将整个模型划分为抽样﹑量化﹑编码等几个子系统,并在传输线路上加入高斯白噪声以检验该系统的传输质量和抗干扰能力。(Title Design and Simulation for PCM communication system Abstract )
    2012-04-27 08:24:53下载
    积分:1
  • TestMatlab
    说明:  在CC++中调用Matlab, 了解调用MATLAB接口(In CC++ Calling Matlab, learn to call MATLAB Interface)
    2008-12-04 10:30:41下载
    积分:1
  • MATLAB-CPP
    用实例演示如何在matlab中调用c++,适用于初学者,很好的例子(With examples demonstrate how to call c++ in matlab for beginners, a good example)
    2014-01-07 14:04:04下载
    积分:1
  • cma
    光纤信道盲均衡CMA算法,MATLAB开发环境,比较通用的一种算法(Fibre Channel CMA blind equalization algorithms, MATLAB development environment, more generic algorithm)
    2014-11-23 08:50:11下载
    积分:1
  • 3dfdtd
    fdtd 电磁计算 三维电磁仿真技术 电磁场计算 fdtd 算法(fdtd Em compute em field calculation )
    2014-02-09 17:16:19下载
    积分:1
  • 696518资源总数
  • 105540会员总数
  • 37今日下载