文件名称:complex
- 所属分类:
- 数据库系统
- 资源属性:
- [C/C++] [源码]
- 上传时间:
- 2012-11-26
- 文件大小:
- 3kb
- 下载次数:
- 0次
- 提 供 者:
- Mjuos J********
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
/*目的:使一個複數可顯數出來,可做+-/*,還要可以做>>跟<<的功能
題目:定義一個複數的class叫Complex,a(實部)與b(虛部)為double的型態,i表示根號-1,
1.必須包含一個建構子有兩個參數(double型態),能被用來設定物件中的變數為任意值
2.包含一個建構子只有一個參數(double型態),呼叫參數的實部且定義為"實部+0i"
3.包含一個預建構子可把物件初始化為0+0i
4.overload以下的operator以致於可以正確的執行:+ - * / << >>
*/-/* Purpose: To make a plural number may be significantly out of 2B !-/*, can also can be done>> with <<the function of the subject: the definition of the class is called a plural Complex, a (real part) and b (virtual Department) for the double type, i said kan-1,1 No.. must contain a sub-construct two parameters (double type), can be used to set object variables for arbitrary value of 2. contains a sub-construct There is only one parameter (double type), call parameters and the real part is defined as the real part of+ 0i 3. contains a pre-construction sub-object can be initialized to 0+ 0i4.overload below so operator can correct the implementation of:+-*/<<>>* /
題目:定義一個複數的class叫Complex,a(實部)與b(虛部)為double的型態,i表示根號-1,
1.必須包含一個建構子有兩個參數(double型態),能被用來設定物件中的變數為任意值
2.包含一個建構子只有一個參數(double型態),呼叫參數的實部且定義為"實部+0i"
3.包含一個預建構子可把物件初始化為0+0i
4.overload以下的operator以致於可以正確的執行:+ - * / << >>
*/-/* Purpose: To make a plural number may be significantly out of 2B !-/*, can also can be done>> with <<the function of the subject: the definition of the class is called a plural Complex, a (real part) and b (virtual Department) for the double type, i said kan-1,1 No.. must contain a sub-construct two parameters (double type), can be used to set object variables for arbitrary value of 2. contains a sub-construct There is only one parameter (double type), call parameters and the real part is defined as the real part of+ 0i 3. contains a pre-construction sub-object can be initialized to 0+ 0i4.overload below so operator can correct the implementation of:+-*/<<>>* /
(系统自动生成,下载前可以参看下载内容)
下载文件列表
complex.cpp