I have an assignment of the following.
Create a class named Fractions having two integer data members named for a fraction’s numerator and denominator. The Class’s default constructor should provide both data members with default values of 1 if no explicit user initialization is provided. The constructor must also prohibit a 0 denominator value. Additionally, provide member functions for displaying an object’s data values. Also provide the class with overloaded operators that are capable of adding, subtracting, multiplying and dividing two Fraction objects according to the following formulas:
Sum of two fractions: a/b + c/d = ad + cb
Difference of two fractions: a/b – c/d = ad – cb
Product of two fractions a/b X c/d = ac
Division of two fractions: a/b / c/d = ad
To be fairly honest with you, I don't even know where to begin on this. I will toy with it and post what I have and hope you guys can help me.