C++ Problem! Help!

• 11-19-2001
dale380
C++ Problem! Help!
i need help writing this program. i have no clue how.

A mixed number is composed of three integers, with the first integer representing a whole number, the second integer representing the numerator of the fractional part, and the third integer representing the denomination of the fractional part. For example: 1 2/3 or -6 7/8. Two mixed numbers are capable of being added, subtracted, multiplied, and divided according to basic arithmetic rules. They can also be compared to determine which one is smaller.

Create a MixedNumber class. You should provide constructors to make objects out of triples of int values; this is a three int parameter constructor. You should also provide constructors to make objects out of single int values, since every int is also a complete mixed number, as in 2 = 2 0/1 or 17 = 17 0/1.

Provide non-member functions add, sub, mul, and div that have two mixed number reference arguments and return a mixed number value. Provide a function Iess that returns a bool value that has two mixed number reference parameters. These functions should do the operation suggested by the name. Provide function neg that takes a single reference mixed number parameter and returns the negative of the mixed number argument. Provide function void copy that has two reference mixed number parameters. The first is a reference parameter called to, and the second is a reference parameter that is called from. This function copies one mixed number to another.

Let any sign be carried by the whole number, keep the numerator and the denominator positive.

Design and implement a menu driven program that will test all the features of your MixedNumber class, especially the ability to do mixed number arithmetic..
• 11-19-2001
lightatdawn
What have you done so far? What specific portion do you need help with?