FileDocCategorySizeDatePackage
ComplexDemo.javaAPI DocExample569Sat Nov 25 12:56:00 GMT 2000None

ComplexDemo

public class ComplexDemo extends Object
A class to test Complex Numbers.
author
Ian F. Darwin, ian@darwinsys.com
version
$Id: ComplexDemo.java,v 1.3 2000/11/25 17:56:00 ian Exp $

Fields Summary
Constructors Summary
Methods Summary
public static voidmain(java.lang.String[] args)
The program

		//+
		Complex c = new Complex(3,  5);
		Complex d = new Complex(2, -2);
		System.out.println(c + ".getReal() = " + c.getReal());
		System.out.println(c + " + " + d + " = " + c.add(d));
		System.out.println(c + " + " + d + " = " + Complex.add(c, d));
		System.out.println(c + " * " + d + " = " + c.multiply(d));
		//-