文件名称:fushu
- 所属分类:
- JSP源码/Java
- 资源属性:
- [WORD]
- 上传时间:
- 2012-11-26
- 文件大小:
- 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