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 member functions to add and multiply a fraction object to another fraction object and store the result in a new object . You might need to recall some high school math here regarding common denominators, however you may find everything you need on last page of Chapter (6).  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.