package ir2.td8;

public class Complex {
	  
	public Complex(){
		this.re = 0;
		this.im = 0;
	}
	
	public Complex(double re, double im) {
		this.re = re;
		this.im = im;
	}
	
	public double getReal(){
		return re;
	}
	
	public double getImaginary(){
		return im;
	}

	public Complex sum(Complex c){
		return new Complex(this.re+c.re,this.im+c.im);
	}
	
	private double re;
	private double im;
}
