Reference no: EM132588390
Machine Problem - Building off of the Fraction class you wrote at the beginning of the semester, do the following:
1. Overload the >> operator for reading in from a data file. Make sure the Fraction is reduced after it is read in
2. Read the FractsToVector.txt data file into a Vector of Fractions and return that vector sorted to the main function
3. Read the FractsToList.txt data file into a List of Fractions and return that list sorted to the main function
4. Now pass the sorted Vector and the sorted List into a Merge function. The Merge function will then combine the two into a new Vector of Fractions. Make sure the new Vector does NOT contain any duplicates. Return that new vector of Fractions sorted back to the main function.
5. Print out the first Vector, the List and the merged Vector to the screen
The data file is in the format of 2 integers on each line representing the numerator and denominator. See the 2 attached files to see what I mean.
Submit your Fraction.cpp and Fraction.h and then your main.cpp files.
Attachment:- Machine Problem.rar