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

6_1

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

  • TestUseMatlab
    VC 中调用MATLAB 程序功能: 为了在vc中调用MATLAB而写的一个简单测试程序 设置路径: 根据MATLAB所在盘而定,例如我的matlab是装在D盘的,所以需要包含的路径为 D:MATLAB6p1externinclude,在工程中设置 需包含的头文件: //matlab中的头文件调用matlab的函数 #include "engine.h" 需要连接的LIB库: D:MATLAB6p1externlibwin32digitaldf50libeng.lib D:MATLAB6p1externlibwin32digitaldf50libmx.lib 支持mx函数 (程序功能: 为了在vc中调用MATLAB而写的一个简单测试程序 设置路径: 根据MATLAB所在盘而定,例如我的matlab是装在D盘的,所以需要包含的路径为 D:MATLAB6p1externinclude,在工程中设置 需包含的头文件: //matlab中的头文件调用matlab的函数 #include "engine.h" 需要连接的LIB库: D:MATLAB6p1externlibwin32digitaldf50libeng.lib D:MATLAB6p1externlibwin32digitaldf50libmx.lib 支持mx函数 )
    2009-05-15 09:41:58下载
    积分:1
  • OCR2
    this file classify number an alphabet
    2009-12-05 01:00:35下载
    积分:1
  • TVehicleDynamh
    ,建立车体6个自由度加上前轮转向系统1个自由度的汽车数学模型;该汽车数学模型不需引入很多的人为假设;可以实现给定汽汽车前轮转角,也可以不给定前轮转角;不依赖需要复杂测定的侧向力函数及相关模型参数;考虑了轮胎的滚动特性 已通过测试。 (Vehicle mathematical model of one degree of freedom, the establishment of the body' s six degrees of freedom coupled with front-wheel steering system mathematical model of the car does not need to introduce a lot of people assume front wheel angle can be achieved given steam can also be given front wheel angle does not depend on the complex determination of the lateral force function and model parameters consider rolling characteristics of the tire has been tested.)
    2012-07-16 17:29:54下载
    积分:1
  • CMA-IN-Channel-equalization
    常模量算法在通信过程中使用信道均衡时的效果(Application of constant modulus algorithm in channel equalization)
    2015-04-07 21:15:33下载
    积分:1
  • Sonar_Exp_v2_CW
    声纳技术 常用水声信号及其处理方法 内容 CW信号(Commonly used in underwater acoustic signal processing method)
    2012-04-15 08:54:09下载
    积分:1
  • lianbiao
    关于链表的实现例子很完美呵呵要的朋友请下哦!!!(With regard to the realization of the list is a perfect example of a friend to call on the next Hehe Oh! ! !)
    2009-12-28 12:51:26下载
    积分:1
  • lizidenoising
    这是一种基于粒子权重去噪代码,本人自己实现,非常实用。(Based on the particle weight denoising code)
    2015-04-11 09:52:59下载
    积分:1
  • MyView
    自己写的混合遗传算法模板匹配程序,实现功能良好(temple match)
    2012-04-16 21:11:52下载
    积分:1
  • ex_kaiser
    kaiser窗函数的用法,这是一个资料上的,经过验证了,希望帮得到你。(usage of the kaiser window function, which is an information, after the verification, and hope to help get you.)
    2012-06-15 10:51:40下载
    积分:1
  • chudeng
    一个介绍matlab的课件,介绍初等模型的,相信对大家都有用处的,很好的课件。(An introduction matlab courseware to introduce elementary model, I believe we have useful, well courseware.)
    2010-07-27 16:41:55下载
    积分:1
  • 696516资源总数
  • 106913会员总数
  • 8今日下载