// test-Frac.cpp - test driver for Frac (fraction) type #include using namespace std; #include "Frac.h" int main( void ) { Frac f(2,3); Frac g; Frac *p = new Frac(3,5); g.setNumerator(22); g.setDenominator(7); cout << "Before inversion:" << endl; cout << "f = " << f.getNumerator() << "/" << f.getDenominator() << endl; cout << "g = " << g << endl; cout << "*p = " << p->getNumerator() << "/" << p->getDenominator() << endl; f.invert(); g.invert(); p->invert(); cout << "After inversion:" << endl; cout << "f = " << f.getNumerator() << "/" << f.getDenominator() << endl; cout << "g = " << g << endl; cout << "*p = " << (*p).getNumerator() << "/" << (*p).getDenominator() << endl; Frac h = f + g; cout << f << " + " << g << " = " << h <