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

6_1

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

  • Fibonacci2
    Fibonacci问题,sicily 张老师题目(Fibonacci problem, sicily Zhang topic)
    2014-10-11 09:28:12下载
    积分:1
  • Pchap10_11sI
    机器人的PID控制之确定性单臂机械手的PD+前馈控制(先进进PID控制MATLAB仿真第二版),已通过测试。 (PID control of robot uncertainty arm manipulator PD+ before feed-forward control (Advanced PID Control MATLAB simulation), has been tested.)
    2012-07-19 20:56:26下载
    积分:1
  • FDTD
    基于matlab 模拟仿真FDTD算法对印刷电路板表面的传输特性(Based on MATLAB simulation FDTD algorithm on the surface of the printed circuit board transmission characteristics)
    2012-07-11 19:45:57下载
    积分:1
  • turbo-code
    说明:  我不多说废话,这是一个完整的TURBO码的编解码程序,对想做信道编码仿真的人绝对利好,该死的20个字(I will not nonsense, it is a complete code of TURBO codec procedures, right wants to channel coding simulation of absolute good, damned 20 characters)
    2006-05-12 12:30:09下载
    积分:1
  • vb
    说明:  是matlab中对bp理论的源代码 通过此代码 只需输入原始数据 通过计算可以得到 预期的输出结论(the cold for matlab)
    2013-12-19 19:28:44下载
    积分:1
  • eslabprgms
    visual c++ FOR EMBEDDED SYSTEMS AND FOR REAL TIME APPLICATIONS
    2013-08-26 22:03:52下载
    积分:1
  • OFDM
    OFDMmatlab仿真程序,改程序是一个仿真系统,附有文档说明。(OFDMmatlab simulation program, the reform process is a simulation system, accompanied by documentation.)
    2013-10-25 21:11:40下载
    积分:1
  • chengxu
    食堂用餐拥挤问题 但服务台多队列模型 系统优化(Canteen meals congestion problem, but help desk Multi-Queue Model of System Optimization)
    2010-03-15 22:43:37下载
    积分:1
  • emd
    HHT gcc代码,专门用于希尔伯特黄变换。(HHT gcc code, specifically for the Hilbert-Huang Transform.)
    2010-05-06 15:29:00下载
    积分:1
  • Super-Trend-Profit
    Ea forex, um bom robot
    2015-03-25 04:16:11下载
    积分:1
  • 696518资源总数
  • 106148会员总数
  • 10今日下载