// testcomplex.cpp - tests complex.cpp (and int.cpp) // DO NOT CHANGE THIS FILE - you will not turn it in // use to test CS 60 assignment 4, part 4, Fall 2009 // cmc, updated 11/3/09 #include #include "complex.h" // slightly expanded from Nagler, p. 162 int main() { Int const one(1), minusOne(-1); Int const two(add(one, one)); Complex const c1(minusOne, two), c2(3, -4), c3(c1), c4(c2); Complex sum1(add(c3, c4)); std::cout << "sum1: "; sum1.display(); Int const zero; Complex const c5, c6(4), c7(zero, 3); Complex sum2(add(c5, c6)); std::cout << "sum2: "; sum2.display(); Complex sum3(add(sum2, c7)); std::cout << "sum3: "; sum3.display(); }