文件名称:ComplexNumber
介绍说明--下载内容来自于网络,使用问题请自行百度
请根据下列要求,设计一个复数类。
(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
1999-2046 搜珍网 All Rights Reserved.
本站作为网络服务提供者,仅为网络服务对象提供信息存储空间,仅对用户上载内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。