Question: Problem 2 Gaddis Chapter More About Classes and Object-Oriented Programming Rational Arithmetic I and Rational Arithmetic II You should be turning in a Rational.h, Rational.cpp

Problem 2

Gaddis Chapter "More About Classes and Object-Oriented Programming"

Rational Arithmetic I and Rational Arithmetic II

You should be turning in a Rational.h, Rational.cpp and rationaldriver.cpp that has your main.

All meaningful rational number code should be encapsulated in your Rational class.

Make sure to overload the asked for operators.

Make sure to create Rationals for each of the 4 stated examples in Rational Arithmetic I and show they reduce by using the overloaded << to output to the console.

Make sure to test your overloaded arithmetic expressions using the 4 expressions outlined in Rational Arithmetic II and output the resulting Rationals.

Use console for I/O. Use consts where appropriate.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!