Question 2: Relations, Relations, Relations …
We constructed the Rat class to model fractions and to give us the ability to compute with them. Since fractions are numeric types, we might want to extend the set of operations on them to include the relational operators. (20 points)
So, if X and Y are Rats we want to be able say X==Y, X>Y, and X<Y. The obvious choice is to add them as member functions.
C++ provides operator==, operator> and operator< that can be overloaded for this purpose. They should be implemented so that they return bools.
The problem:
a) Write operator==(…) that returns true if X==Y and false otherwise.
Note that all equivalent Rats should return true.
So if X = 1 / 2 and y= 2 / 4 the X==Y should return true. (10 points)
b) Write operator>(…) (5 points)
c)Write operator <(…) (5 points)
Thanks for posting " Help with an Advance C++ withing 30 mins " project
I read your description carefully.
As a software expert, I am very interested in your project.
I hope to discuss this project with you.
I think we can get good results if we cooperate.
I will be glad to work with you.
thanks abd I will wait for your response.
Avin H.
I'm ready to overload those operations for you and provide 100% correct answers in 30 minutes as requested. Get in touch to kick-start the implementation right now.