Numbers
Class ComplexQuadraticEquation

java.lang.Object
  extended by Numbers.ComplexQuadraticEquation

public class ComplexQuadraticEquation
extends java.lang.Object

Models the Quadratic Equation using Complex Numbers.

Author:
Chris Hamner

Field Summary
private  double a
          Real 1
private  double b
          Imaginary 1
private  double c
          Real 2
private  ComplexNumber cn1
          The "a" part of the quadratic equation (complex number 1)
private  ComplexNumber cn2
          The "b" part of the quadratic equation (complex number 2)
private  ComplexNumber cn3
          The "c" part of the quadratic equation (complex number 3)
private  double d
          Imaginary 2
private  double e
          Real 3
private  double f
          Imaginary 3
 
Constructor Summary
ComplexQuadraticEquation(double a, double b, double c, double d, double e, double f)
          Constructs a new quadratic equation, using complex numbers.
 
Method Summary
 ComplexNumber getSolution1()
          Finds and returns the first solution to the problem.
 ComplexNumber getSolution2()
          Finds and returns the first solution to the problem.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

a

private double a
Real 1


b

private double b
Imaginary 1


c

private double c
Real 2


d

private double d
Imaginary 2


e

private double e
Real 3


f

private double f
Imaginary 3


cn1

private ComplexNumber cn1
The "a" part of the quadratic equation (complex number 1)


cn2

private ComplexNumber cn2
The "b" part of the quadratic equation (complex number 2)


cn3

private ComplexNumber cn3
The "c" part of the quadratic equation (complex number 3)

Constructor Detail

ComplexQuadraticEquation

public ComplexQuadraticEquation(double a,
                                double b,
                                double c,
                                double d,
                                double e,
                                double f)
Constructs a new quadratic equation, using complex numbers.

Parameters:
a - - Complex Number 1, real part
b - - Complex Number 1, imaginary part
c - - Complex Number 1, real part
d - - Complex Number 1, imaginary part
e - - Complex Number 1, real part
f - - Complex Number 1, imaginary part
Method Detail

getSolution1

public ComplexNumber getSolution1()
Finds and returns the first solution to the problem.

Returns:

getSolution2

public ComplexNumber getSolution2()
Finds and returns the first solution to the problem.

Returns: