4

所属分类:OpenGL
开发工具:Visual C++
文件大小:35KB
下载次数:2
上传日期:2013-03-09 17:04:03
上 传 者luoyujun
说明:  1、定义一个复数类,要求包括 i、无参构造函数,初始化实部和虚部均为0 ii、有参构造函数,通过参数初始化实部和虚部 iii、输出复数的成员函数 iv、以成员函数的方式重载复数加法 v、以友元的方式重载复数加法 2、三维数据型如a+bi+cj(其中abc为实数),加法法则为 (a1+b1i+c1j)+(a2+b2i+c2j)=(a1+a2)+(b1+b2)i+(c1+c2)j 要求 i、以题目1的复数为基础,采用继承的方式构造三维数据类(包括无参和有参构造函数) ii、以成员函数的方式重载三维数据加法 iii、以友元的方式重载三维数据加法
(1, the definition of a complex class requirements include i no-argument constructor, initialize the real and imaginary parts are 0 ii, arg constructor, the real and imaginary parts of the parameter initialization iii output plural members the function iv member function overloaded complex addition v overloaded complex addition, three-dimensional data type, such as a+bi+cj (where abc is a real number), the addition rule for (a1+b1i+c1j)+ (a2+b2i+c2j) = (a1+a2 to a friend )+ (b1+b2) i+ (c1+c2) j requires i, based topic plural, using inheritance to construct 3D data classes (including parameters and parameter constructor) ii way overloaded member function of the three-dimensional data Addition iii friend way overloaded three-dimensional data addition)

文件列表:
作业5运算符的从载 复数加法\fushu1.cpp (721, 2010-06-01)
作业5运算符的从载 复数加法\fushu2.cpp (1159, 2010-06-01)
作业5运算符的从载 复数加法\作业5.doc (60928, 2010-07-04)
作业5运算符的从载 复数加法 (0, 2013-03-09)

近期下载者

相关文件


收藏者