Question: Using c++ Write a rational number class. For now, we will use member functions add, sub, mul, div and less that each carry out the

Using c++
Write a rational number class. For now, we will use member functions add, sub, mul, div and less that each carry out the operations +, -, *, /, and <. For example , a+b will be written as a.add(b), and a<(c/d) means (a*d) <(c*b) Let any sign be carried by the numerator, keep the denominator positive.

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!