文件名称:ComplexNumber
- 所属分类:
- JSP源码/Java
- 资源属性:
- [Java] [源码]
- 上传时间:
- 2012-11-26
- 文件大小:
- 1kb
- 下载次数:
- 0次
- 提 供 者:
- g**
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
请根据下列要求,设计一个复数类。
(1)复数由实部、虚部组成,在类的定义中应包含保存这两部分信息的内容。
(2)在类中定义构造方法,使用户能够在构造对象的同时为对象赋初值。
(3)在类中定义复数的加、减两个成员方法来完成复数功能。
(4)重写toString方法,使得复数类的对象能够以“实部 + 虚部i”的格式,输出自身信息。
(5)在main方法中完成相关测试。
-Please according to the following requirements, design of a complex type.
(1) by the real part of the complex, the imaginary part, in the class definition should include the preservation of these two parts of information content.
(2) in the definition of the class structure method, enables the user to construct the object at the same time as the object initialization.
(3) defined in the class complex add, subtract two member to complete the complex function method.
(4) override the toString method, the plural class object can be "real+ imaginary part I" format, output information.
(5) in the main method completes the related test.
(1)复数由实部、虚部组成,在类的定义中应包含保存这两部分信息的内容。
(2)在类中定义构造方法,使用户能够在构造对象的同时为对象赋初值。
(3)在类中定义复数的加、减两个成员方法来完成复数功能。
(4)重写toString方法,使得复数类的对象能够以“实部 + 虚部i”的格式,输出自身信息。
(5)在main方法中完成相关测试。
-Please according to the following requirements, design of a complex type.
(1) by the real part of the complex, the imaginary part, in the class definition should include the preservation of these two parts of information content.
(2) in the definition of the class structure method, enables the user to construct the object at the same time as the object initialization.
(3) defined in the class complex add, subtract two member to complete the complex function method.
(4) override the toString method, the plural class object can be "real+ imaginary part I" format, output information.
(5) in the main method completes the related test.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
ComplexNumber.java