Question: Write an abstract data type for rational numbers (a numerator and a denominator). Include a constructor and methods for getting the numerator, getting the denominator,
Write an abstract data type for rational numbers (a numerator and a denominator). Include a constructor and methods for getting the numerator, getting the denominator, addition, subtraction, multiplication, division, equality testing, and display. Use Java, C#, C++, or Ruby.
Step by Step Solution
3.50 Rating (163 Votes )
There are 3 Steps involved in it
Here is the code in c include include using namespace std struct rational int num ... View full answer
Get step-by-step solutions from verified subject matter experts
