Problem

Define a rational number class. A rational number is a number composed of two integers wit...

Define a rational number class. A rational number is a number composed of two integers with division indicated, as in 1/2, 2/3, and 4/5. A rational number is defined using two integer variables: numerator and denominator. Include functions to perform the following operations:

a/b + c/d = (a.d + b.c) / (b.d) (addition)a/b - c/d = (a.d - b.c) / (b.d) (subtraction)(a/b) . (c/d) = (a.c)/(b.d)    (multiplication)(a/b) / (c/d) = (a.d) / (c.b)   (division)

Step-by-Step Solution

Request Professional Solution

Request Solution!

We need at least 10 more requests to produce the solution.

0 / 10 have requested this problem solution

The more requests, the faster the answer.

Request! (Login Required)


All students who have requested the solution will be notified once they are available.
Add your Solution
Textbook Solutions and Answers Search
Solutions For Problems in Chapter 8