(Omit source code)
return imaginary;
return real;
imaginary = i;
real = r;
return real + " + " + imaginary + "i";