/* * Intro to Programming CSE 1310 * University of Texas at Arlington */ /* * File: main.cpp * Author: jcmtiernan * * Created on June 27, 2017, 2:58 PM */ #include #include #include "Fraction.h" #include "Fraction.cpp" //#include "Fraction" /* * */ using namespace std; int main(int argc, char** argv) { int alpha = 15; double beta = 4.5; Fraction frac1; Fraction frac2(3,5); cout << "alpha is "<< alpha << " and beta is "<< beta << endl; double gamma = alpha+beta; cout << "Sum of alpha + beta is " << gamma << endl<> numer; frac2.SetFrac(numer, frac2.Getdenom()); cout << endl; cout << "New frac2 value: "; cout << frac2.PrintFrac() << endl; cout << "Decimal value of Fraction 2: " << frac2.DecimalFrac() << endl; cout << endl; Fraction frac1A(1,2); Fraction frac1B(1,2); Fraction frac2A(2,3); Fraction frac2B(1,4); cout << "The product of Fraction frac1A * frac1B = " << frac1A.PrintFrac() << " * " << frac1B.PrintFrac() << " = " << frac1A.MultiplyFraction(frac1B).PrintFrac(); Fraction frac3A(2,6); Fraction frac3B(6,9); cout << endl << "Comparing Fraction frac3A and frac3B = " << frac3A.PrintFrac() << " and " << frac3B.PrintFrac() << " gives a result of " << frac3A.compareto(frac3B)<