- Unitary-ESPRIT-Algorithm 面阵中二维角度估计 Unitary
- rectangle-plane-antenna-array 运用遗传算法对不等幅不等距矩型平面阵列的最大相对旁瓣电平进行了优化
- gprmax 对GPRmax的数据进行成图的一些matlab程序
- 4Statistical-pattern-recognition The primary goal of pattern recognition is supervised or unsupervised classification. Among the various frameworks in which pattern recognition has been traditionally formulated
- Image retrieval 基于内容的图像查询
- TcpServerClient 包含三个类
文件名称:8.10
-
所属分类:
- 标签属性:
- 上传时间:2013-05-04
-
文件大小:1.62kb
-
已下载:0次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
为二次方程式ax2+bx+c=0设计一个名为QuadraticEquation的类。这个类包括:
代表三个系数的私有数据域a、b、c。
一个参数为a、b、c的构造方法。
a、b、c的三个get方法。
一个名为getDiscriminant()的方法返回判别式,b2-4ac。
一个名为getRoot1()和getRoot2()的方法返回等式的两个根。
这些方法只有在判别式为非负数时才有用。如果判别式为负,方法返回0。
画出该类的UML图。实现这个类。编写一个测试程序,提示用户输入a、b、c的值,然后显示判别式的结果。如果判别式为正数,显示两个根;如果判别式为0,显示一个根;否则,显示“The equation has no roots”。-The design of a class named QuadraticEquation to two times ax2+bx+c=0 equation. This class includes:
Private data represent three coefficients a, B, C.
A parameter for the construction method of a, B, C.
A, B, C three get method.
A getDiscriminant () method returns the discriminant, b2-4ac.
A getRoot1 () and getRoot2 (two) root method returns.
These methods only in discriminant non-negative number is only useful for. If the discriminant is negative, the method returns 0.
To draw the UML chart. The implementation of this class. Write a test program, prompts the user to input a, B, C value, and then display the results of the discriminant. If the discriminant is positive, showing two root if the discriminant is 0, showing a root otherwise, The equation has no roots "".
代表三个系数的私有数据域a、b、c。
一个参数为a、b、c的构造方法。
a、b、c的三个get方法。
一个名为getDiscriminant()的方法返回判别式,b2-4ac。
一个名为getRoot1()和getRoot2()的方法返回等式的两个根。
这些方法只有在判别式为非负数时才有用。如果判别式为负,方法返回0。
画出该类的UML图。实现这个类。编写一个测试程序,提示用户输入a、b、c的值,然后显示判别式的结果。如果判别式为正数,显示两个根;如果判别式为0,显示一个根;否则,显示“The equation has no roots”。-The design of a class named QuadraticEquation to two times ax2+bx+c=0 equation. This class includes:
Private data represent three coefficients a, B, C.
A parameter for the construction method of a, B, C.
A, B, C three get method.
A getDiscriminant () method returns the discriminant, b2-4ac.
A getRoot1 () and getRoot2 (two) root method returns.
These methods only in discriminant non-negative number is only useful for. If the discriminant is negative, the method returns 0.
To draw the UML chart. The implementation of this class. Write a test program, prompts the user to input a, B, C value, and then display the results of the discriminant. If the discriminant is positive, showing two root if the discriminant is 0, showing a root otherwise, The equation has no roots "".
(系统自动生成,下载前可以参看下载内容)
下载文件列表
Third.class
Third.java
Third.java
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.