// Complex.h: interface for the CComplex class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_COMPLEX_H__DDF879E1_5100_4AD9_909C_0C61887CED08__INCLUDED_)
#define AFX_COMPLEX_H__DDF879E1_5100_4AD9_909C_0C61887CED08__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include <iostream>
using std::ostream;
using std::istream;

class Complex  
{
public:
    Complex(void);	
    Complex(double real, double imaginary);
	virtual ~Complex();
	bool equal(Complex rhs, double precision);
	double magnitue();
	bool divide(Complex rhs);
	void multiply(Complex rhs);
	void subtract(Complex rhs);
	void add(Complex rhs);
    static void unitTest();
	void print(ostream &os);
private:
	double m_real;
	double m_imaginary;
};

ostream &operator<<(ostream& os, Complex &x);
istream &operator>>(istream& is, Complex &x);

#endif // !defined(AFX_COMPLEX_H__DDF879E1_5100_4AD9_909C_0C61887CED08__INCLUDED_)
