package ClassesIntro;
public class ComplexNumberTest {
public static void main(String[] args) {
if (args.length > 0) {
String a1 = args[0];
String a2 = args[1];
ComplexNumber c3 = new ComplexNumber(Double.parseDouble(a1), Double.parseDouble(a2));
System.out.println("C3: " + c3);
}
ComplexNumber c1 = new ComplexNumber(2.4, 3.7);
ComplexNumber c2 = new ComplexNumber(1.3, 3.1);
ComplexNumber product = c1.multiply(c2);
System.out.println("Product: " + product);
c1.setReal(-3);
c2.setImaginary(-2.1);
System.out.println(c1.getReal());
System.out.println(c2.getReal());
System.out.println(c1);
System.out.println(c2);
System.out.println("The product of " + c1 + " and " + c2 + " is " + c1.multiply(c2));
}
}