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

6_1

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

  • B3g_phase2
    B3g_phase2_C语言_Matlab程序及说明(_Matlab Procedures and B3g_phase2_C language description)
    2007-09-07 10:22:52下载
    积分:1
  • LogOn(1)
    好用的程序,多去查资料,你会有很大的收获(good)
    2010-01-12 16:10:49下载
    积分:1
  • vcPP6.0
    仿真火车站的站场图,可以办理进路,显示信号机,单操,单锁道岔等功能(Simulation Station station map, you can handle into the road.)
    2013-11-23 17:46:30下载
    积分:1
  • drbd-8.3.6.tar
    drbd源文件,热备使用,与heartbeat配合使用,drbd源文件,热备使用,与heartbeat配合使用(DRBD source file, use hot standby, and heartbeat, DRBD source file, use hot standby, used with the heartbeat)
    2013-12-03 21:16:49下载
    积分:1
  • Arduino-PID-Library-master
    Arduino-PID-Library-master库函数,可以轻松实现PID控制,是Arduino的函数库。(Arduino-PID-Library-master library function, you can easily realize the PID control is the Arduino library.)
    2016-07-19 17:54:36下载
    积分:1
  • shiyan
    用matlab编写了一个,信源产生经过BPSK调制以及根号升余弦滤波器后再加上载波最后将波形图输出的程序(Using matlab prepared a source after BPSK modulation, as well as the square root raised cosine filter and then with the carrier waveform graph output of the program)
    2012-11-07 22:00:09下载
    积分:1
  • aerodynamics-of-wind-turbines
    Denmark Technical University的大牛Hansen,第二版风力机空气动力学。(Denmark Technical University' s Daniel Hansen, the second edition of wind turbine aerodynamics.)
    2013-07-19 09:00:35下载
    积分:1
  • RGBtoHsi
    matlab颜色模型转换的代码程序,数字图像处理的matlab程序代码(matlab code color model conversion program, digital image processing matlab code)
    2015-03-18 14:44:05下载
    积分:1
  • matlab2
    用matlab实现图像的各种变换,旋转,大小变换,滤波平滑。(Matlab implementation using a variety of image transformation, rotation, size, transform, smoothing filter.)
    2009-03-08 11:23:51下载
    积分:1
  • AM
    说明:  基于simulink的AM调制与解调仿真(AM modulation and demodulation simulation based on simulink)
    2013-04-11 19:29:12下载
    积分:1
  • 696516资源总数
  • 106554会员总数
  • 12今日下载