private int real;
private int imaginary;
public Complex(int real, int imaginary) {
this.real = real;
this.imaginary = imaginary;
}
public Complex add(Complex z) {
return new Complex(this.real+z.real, this.imaginary + z.imaginary);
}
public long getRealPart() {
return this.real;
}
public long getImaginaryPart() {
return this.imaginary;
}