文件名称:fushu
-
所属分类:
- 标签属性:
- 上传时间:2012-11-16
-
文件大小:3kb
-
已下载:0次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
3. 定义一个复数(z=x+iy)类Complex,包含:
两个属性:实部x和虚部y
默认构造函数 Complex(),设置x=0,y=0
构造函数:Complex(int i,int j)
显示复数的方法:showComp()将其显示为如: 5+8i或5-8i 的形式。
求两个复数的和的方法:(参数是两个复数类对象,返回值是复数类对象)public Complex addComp(Complex C1,Complex C2)
求两个复数的差的方法:(参数是两个复数类对象,返回值是复数类对象)public Complex subComp(Complex C1,Complex C2)
-. A class definition Point, represents a Point, public property have x and y, a method that Point coordinates show (), there are two arguments constructor respectively to x, y assignment, in the main method constructed of two objects, to create a method (getMiddle) to take two make the Point of the line of coordinate, parameters for 2 Point object, call this method after get a new Point, write Application, display the object coordinates.
1. Define a plural (z = x+ iy) kind of Complex, including:
Two attributes: real part x and imaginary part y
The default constructor Complex (), set x = 0, y = 0
The constructor: Complex (int I, int j)
Show the plural method: showComp () will be the display for such as: 5+ 8 I or 5-8 I form.
For two of the plural and methods: (parameters are two plural class object, the return value is a plural class object) public Complex addComp (Complex C1, Complex C2)
For two of the plural of poor methods: (parameters are two plural class object, the return v
两个属性:实部x和虚部y
默认构造函数 Complex(),设置x=0,y=0
构造函数:Complex(int i,int j)
显示复数的方法:showComp()将其显示为如: 5+8i或5-8i 的形式。
求两个复数的和的方法:(参数是两个复数类对象,返回值是复数类对象)public Complex addComp(Complex C1,Complex C2)
求两个复数的差的方法:(参数是两个复数类对象,返回值是复数类对象)public Complex subComp(Complex C1,Complex C2)
-. A class definition Point, represents a Point, public property have x and y, a method that Point coordinates show (), there are two arguments constructor respectively to x, y assignment, in the main method constructed of two objects, to create a method (getMiddle) to take two make the Point of the line of coordinate, parameters for 2 Point object, call this method after get a new Point, write Application, display the object coordinates.
1. Define a plural (z = x+ iy) kind of Complex, including:
Two attributes: real part x and imaginary part y
The default constructor Complex (), set x = 0, y = 0
The constructor: Complex (int I, int j)
Show the plural method: showComp () will be the display for such as: 5+ 8 I or 5-8 I form.
For two of the plural and methods: (parameters are two plural class object, the return value is a plural class object) public Complex addComp (Complex C1, Complex C2)
For two of the plural of poor methods: (parameters are two plural class object, the return v
(系统自动生成,下载前可以参看下载内容)
下载文件列表
fushu.doc
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.