import javax.swing.*;

public class complex1test
{  public static void main(String args[])
   {complex1 z1=new complex1();
    z1.real=2.0;
    z1.imaginary=3.25;
    String s="complex number = "+z1.real+" + i*"+z1.imaginary+" \n";
    complex1 z2=new complex1();
    z2.real=1.1;
    z2.imaginary=2.0;
    s+="complex number = "+z2.real+" + i*"+z2.imaginary+" \n";
    complex1 z3=new complex1();
    z3.real=z1.real+z2.real;
    z3.imaginary=z1.imaginary+z2.imaginary; 
    s+="total of complex number = "+z3.real+" + i*"+z3.imaginary+" \n";
   JOptionPane.showMessageDialog(null,s, "complex1 sınıfı testi",JOptionPane.PLAIN_MESSAGE);
   }
}