// complex.cc   A class for Complex Numbers
// P. Conrad for CISC181, Spring 2006
// define our member functions.

#include <iostream>
#include "complex.h"

// definition of the constructor

Complex_C::Complex_C()
{
  // the purpose of a constructor is simply to
  // initialize the data members

  a = 0.0;
  b = 0.0;
}

void Complex_C::setReal(double aVal)
{
  a = aVal;
}

void Complex_C::setImag(double bVal)
{
  b = bVal;
}

double Complex_C::getReal(void) const
{
  return a;
}

double Complex_C::getImag(void) const
{
  return b;
}

void Complex_C::print(void) const
{
  std::cout << a << " + " << b << "i";
}

