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

6_1

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

  • new
    系统仿真代码 MATLAB 基于CMMB的仿真源文件 不是原创(nothing )
    2013-04-26 12:43:21下载
    积分:1
  • Teecef2ecih
    此matlab函数可以在ECEF和ECI坐标之中转转换地点和速率信息。 ,经测试可直接使用。 (This Matlab function can be transferred into the ECEF and ECI coordinate conversion location and rate information. Has been tested and can be used directly.)
    2012-07-17 23:09:58下载
    积分:1
  • MATLAB
    《MATLAB智能算法30个案例》分析源代码(" MATLAB intelligent algorithm 30 case" analyze the source code)
    2013-07-19 12:49:57下载
    积分:1
  • smat2c
    matlab语言转换成学语言,源程序主要用于生成粒子群算法(matlab language into learning the language, the source is mainly used to generate the PSO)
    2013-10-13 11:32:21下载
    积分:1
  • matlaboptionals
    说明:  matlab 解决最优化问题的教程。在科学研究和工程实践中经常遇到。(matlab solve the optimization problem of the course. In scientific research and engineering are often encountered in practice.)
    2009-08-19 14:43:29下载
    积分:1
  • 409417080235
    1.熟悉matlab基础操作。 2.能够用Lagrange插值, Newton插值法对函数表进行一次、二次、三次插值,体会各种插值方法不同的特点。 (A. Familiar with matlab underlying operating. Two. With Lagrange interpolation, Newton interpolation function table once, quadratic, cubic interpolation, and appreciate the different characteristics of the various interpolation methods.)
    2012-06-11 10:36:44下载
    积分:1
  • matlab_VC
    matlab与vc的混合编程说明,主要是如何配置环境,有详细的截图说明(the help for together using of matlab and VC6.0,including collocate environment and giving detailed illustrate )
    2012-01-03 21:48:36下载
    积分:1
  • Partial-Differential-equation
    偏微分方程_编程 Routines in C, C++, Fortran, Java® , Maple® , and MATLAB(Ordinary and Partial Differential Equation Routines in C, C++, Fortran, Java® , Maple® , and MATLAB)
    2014-11-07 09:14:16下载
    积分:1
  • fiber-mode-LP03
    利用matlab实现光纤的模式分布图的模拟。(Using matlab to achieve mode fiber distribution simulations.)
    2013-07-30 10:10:48下载
    积分:1
  • bingji
    对给定集合A和B,能够编出求A和B的并集C的程序。(For a given set A and B, can be compiled out of order to A and B, and the set of C procedures.)
    2009-12-23 13:19:48下载
    积分:1
  • 696516资源总数
  • 106913会员总数
  • 8今日下载