Homework Assignment

Homework 2, A Rational Class

Short Description:

Implement and test a rational number class.

Goals

When you finish this homework, you should have:

Formal Description

Implement a rational number class.

You class must be implemented in RationalT.h and RationalT.cpp. The type should be called RationalT. This class should store integer based rational numbers.

Your class data should conform to the following standards:

You should provide three constructors You should create the following operations To overload the double operator In addition, you should have a private function void Reduce()

int GCD(int a, int b);

Finally, Implement an overloaded stream insertion operator.

Interface:

Notes

Required Files

Submit a zip or tar file containing

Submission

Submit the assignment to the D2L folder Homework 2 by the due date.