Answer to Question #68463 in C++ for queeny wallace

Question #68463
How do i Create separate functions (outside of the class) to perform the following operations:
• void printRatio(Ratio r): Print a Ratio in the form a/b.
• Ratio getRatio(): Get input from the user for a numerator and denominator and
return a Ratio with the values indicated by the user.
• Provide public functions that perform arithmetic on your new data type: Add, Subtract,
Multiply, Divide two Ratios. The result of arithmetic operations should be a Ratio in
reduced form.
Review the rules of fractional arithmetic to make sure your functions work as one would
expect them to. Remember that for addition and subtraction you need to find a common
denominator, while that is not necessary for multiplication and division.
1
Expert's answer
2017-05-23T19:30:05-0400
Dear queeny wallace, your question requires a lot of work, which neither of our experts is ready to perform for free. We advise you to convert it to a fully qualified order and we will try to help you. Please click the link below to proceed: Submit order

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
APPROVED BY CLIENTS