The Dollar Assignment
You shall write a program that can do to-the-penny math. It shall
use a class implementing this idea.
Your program shall use operator overloading.
You get one point for each commented group from the main() below that
could class can support.
You get one point for using assert().
You lose one point after Mon Feb 23, and and a second after Wed Feb 25th.
This program is out of seven points.
main()
{
// The null constructor
Dollar a;
// A float constructor
Dollar b(12.60), c(1.00);
// Addition
a = b + c;
a = b + a;
// Writing to cout
cout << "This should be 26.20" << a
<< endl;
// Multiplication
a = b * 3;
cout << "This should be 37.80" << a;
// Subtraction
Dollar x(1.50);
Dollar y(0.90);
Dollar z;
z = x - y;
cout << "This should be 0.60" << z;
}