//  File:  Cmplx\RunCmplx.java

import java.io.*;

/**
 * Demonstrate the use of the Complex Number class, Cmplx
 * 
 * @author Bary W Pollack
 * @version Oct 1, 1999
 * @see main
 * @see Cmplx
 */

public class RunCmplx {

	/**
	 * the main method -- demonstrate the Cmplx class
	 * 
	 * @param args unused
	 */

	static public void main(String args[]) {
        System.out.println("Demonstrate Cmplx...\n");

        System.out.println("Default Cmplx =     " + new Cmplx());
        System.out.println("Initialized Cmplx = " + new Cmplx(3, 4));
        System.out.println("Cmplx i (sqrt(-1))= " + Cmplx.i);
        System.out.println();
        
        Cmplx c = new Cmplx(2, 3);
        Cmplx d = new Cmplx(3, 4);
        
        System.out.println(c + " + " + d + " = " + Cmplx.add(c, d));
        System.out.println(c + " - " + d + " = " + Cmplx.sub(c, d));
        System.out.println(c + " * " + d + " = " + Cmplx.mpy(c, d));
        System.out.println(c + " / " + d + " = " + Cmplx.div(c, d));
        System.out.println();
        
        System.out.println("mag(" + d + ")  = " + Cmplx.mag(d));
        System.out.println("conj(" + c + ") = " + Cmplx.conj(c));
        
        System.out.println("\n* Fini *\n");
    }
    
}

