001    package classwork;
002    import java.util.*;
003    /**
004     * Tests the QuadraticEquation class.
005     * @author Tom James
006     *
007     */
008    public class QETester {
009    
010            /**
011             * @param args
012             */
013            public static void main(String[] args) {
014                    // TODO Auto-generated method stub
015                    double a,b,c,d,e,f;
016                    Scanner in = new Scanner(System.in);
017                    a = in.nextInt();
018                    b = in.nextInt();
019                    c = in.nextInt();
020                    d = in.nextInt();
021                    e = in.nextInt();
022                    f = in.nextInt();
023                    QuadtraticEquation equation = new QuadtraticEquation(a,b,c,d,e,f);
024                    //ComplexNumber cn2 = new ComplexNumber(equation.getSolution2().getRealPart(),equation.getSolution2().getImagPart());
025                    ComplexNumber cn1 = new ComplexNumber(equation.getSolution1().getRealPart(),equation.getSolution1().getImagPart());
026                    ComplexNumber cn2 = new ComplexNumber(equation.getSolution2().getRealPart(),equation.getSolution2().getImagPart());
027                    System.out.println("Solution 1: " + cn1.getRealPart() + " + " + cn1.getImagPart() + "i");
028                    System.out.println("Solution 2: " + cn2.getRealPart() + " + " + cn2.getImagPart() + "i");
029            }
030    }