Implement your abstract type representing each rational


Problem

(a) Design a Rational abstract type, whose values are rational numbers m/n. Equip your abstract type with operations such as construction from a given pair of integers m and n, addition, subtraction, multiplication, equality test, and comparison (‘‘is less than'').

(b) Implement your abstract type, representing each rational number by a pair of integers (m, n).

(c) Modify your implementation, representing each rational number by a pair of integers with no common factor. What are the advantages and disadvantages of this modified representation?

Request for Solution File

Ask an Expert for Answer!!
Computer Engineering: Implement your abstract type representing each rational
Reference No:- TGS02654832

Expected delivery within 24 Hours