CS 1440 Lab 7

Cover sheetPrevious Activity                                                      Post-Lab



In file called Fraction.C, write a C++ program that defines a class Fraction.  A fraction consists of a numerator value and a denominator value.  Provide two constructors (one parameterized and one parameterless).  Provide functions to give clients the numerator and denominator values.  Provide functions to add and multiply a fraction object to another Fraction object (you might need to recall some high school math here regarding common denominators).  Your fractions do not have to be simplified; that is, it is okay to end up with a fraction like 10/20.  Have your main function “exercise” the class like done in activity 3 of the lab.