Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Create a class RationalNumber ( fractions ) with these capabilities: a . Implement a constructor that receives two integer parameters ( the first is the
Create a class RationalNumberfractions with these capabilities:
a
Implement a constructor that receives two integer parameters the first is the numerator, and the second is the denominator that prevents a denominator in a fraction, reduces or simplifies fractions that are not in reduced form and avoids negative denominators.
b
Implement a printRational member function that prints out a RationalNumber object.
c
Overload the addition subtraction multiplication division operators, and assignment operators for this class.
d
Overload the relational and equality and operators for this class.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started