classwork
Class QuadtraticEquation

java.lang.Object
  extended by classwork.QuadtraticEquation

public class QuadtraticEquation
extends java.lang.Object

Models a quadratic equation in the form ax^2 + bx + c = 0.

Author:
Tom James

Field Summary
private  double a
          The real part of the first complex number.
private  double b
          The imaginary part of the first complex number.
private  double c
          The real part of the second complex number.
private  ComplexNumber cn1
          The first complex number that is inputted.
private  ComplexNumber cn2
          The second complex number that is inputted.
private  ComplexNumber cn3
          The third complex number that is inputted.
private  double d
          The imaginary part of the second complex number.
private  double e
          The real part of the third complex number.
private  double f
          The imaginary part of the third complex number.
 
Constructor Summary
QuadtraticEquation(double a, double b, double c, double d, double e, double f)
          Constructs a quadratic equation by taking three complex numbers in the forms a+bi, c+di, and e+fi.
 
Method Summary
 ComplexNumber getSolution1()
           
 ComplexNumber getSolution2()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

a

private double a
The real part of the first complex number.


b

private double b
The imaginary part of the first complex number.


c

private double c
The real part of the second complex number.


d

private double d
The imaginary part of the second complex number.


e

private double e
The real part of the third complex number.


f

private double f
The imaginary part of the third complex number.


cn1

private ComplexNumber cn1
The first complex number that is inputted.


cn2

private ComplexNumber cn2
The second complex number that is inputted.


cn3

private ComplexNumber cn3
The third complex number that is inputted.

Constructor Detail

QuadtraticEquation

public QuadtraticEquation(double a,
                          double b,
                          double c,
                          double d,
                          double e,
                          double f)
Constructs a quadratic equation by taking three complex numbers in the forms a+bi, c+di, and e+fi.

Parameters:
a - The real part of the first complex number.
b - The imaginary part of the first complex number.
c - The real part of the second complex number.
d - The imaginary part of the second complex number.
e - The real part of the third complex number.
f - The imaginary part of the third complex number.
Method Detail

getSolution1

public ComplexNumber getSolution1()
Returns:
The first solution to the quadratic equation.

getSolution2

public ComplexNumber getSolution2()
Returns:
The second solution to the quadratic equation.