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

6_1

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

  • bianchengnixiangjishujvfenxi
    编程,逆向及数据分析 编程逆向及数据分析. :数据分析的几个方面的经验总结.(Programming, reverse and data analysis 编程逆向及数据分析. Programming of reverse engineering and data analysis :数据分析的几个方面的经验总结. : data analysis of several aspects of the experience )
    2014-01-03 06:13:35下载
    积分:1
  • rick
    合成地震记录正演模拟n = 5000 采样点数 dx = 50 道间距 dt = 0.02 采样间隔 nl = 3 界面数 m = 80 道数(Forward modeling of synthetic seismograms)
    2014-11-16 10:34:56下载
    积分:1
  • powerflow
    电力系统潮流计算 有关PQ节点平衡节点等的潮流计算(Power system load flow calculation related to PQ node in the node balancing flow calculation, etc.)
    2009-11-24 19:48:29下载
    积分:1
  • VBdiaoyongMATLAB
    说明:  VB调用MATLAB 使用VB来调用matlab里的函数,可以综合matlab的强大功能使vb开发的程序效率更高。(MATLAB using VB to call matlab in VB to call the function, can be integrated so that the power of matlab programs vb efficient.)
    2009-08-02 17:12:37下载
    积分:1
  • reciveqmf
    reciver of qutature mirror filter
    2010-03-02 16:48:46下载
    积分:1
  • array
    说明:  字符数组的建立与基本用法简单的介绍与演示(array)
    2010-04-06 09:21:19下载
    积分:1
  • beibaowenti
    背包问题遗传算法matlan主程序集合很有用(Knapsack problem genetic algorithm matlan main collection of useful)
    2011-04-22 14:25:20下载
    积分:1
  • m
    说明:  MATLAB与C#VisualC++语言混合编程的实现(Realization of hybrid programming language of MATLAB and C# VisualC++)
    2013-03-27 18:57:34下载
    积分:1
  • 层次分析法
    说明:  通过使用matlab,对层次分析法进行求解,从而进一步确定权重,更快的解决问题。(By using matlab, the analytic hierarchy process (AHP) is solved to further determine the weight and solve the problem more quickly.)
    2019-04-18 08:56:05下载
    积分:1
  • m
    说明:  matlab圆柱投影的代码,辛苦管理员了,初学者,求教啊(Matlab code of cylindrical projection, hard administrator, beginners, for advice )
    2015-10-10 19:57:20下载
    积分:1
  • 696516资源总数
  • 106405会员总数
  • 10今日下载