Question
******************USE C++ CODE**** C++ CODE ************************************************************************ THIS IS THE REQUIREMENT FOR THE C++ PROGRAM ******************************************************************************************************************************** Note: 1. the driver program to test your class: Frac2Driver.cpp(dont
******************USE C++ CODE**** C++ CODE ************************************************************************
THIS IS THE REQUIREMENT FOR THE C++ PROGRAM
********************************************************************************************************************************
Note:
1. the driver program to test your class: Frac2Driver.cpp(dont modify it for your final test).
// driver for Fraction project part 2
#include "Frac2.h"
int main()
{
Fraction c( 7, 3 ), d( 3, 9 ), x;
// c.printFraction();
cout
cout
// d.printFraction();
cout
cout
x = c + d;
// x.printFraction();
cout
cout
// c.printFraction();
cout
cout
// d.printFraction();
cout
cout
x = c - d;
// x.printFraction();
cout
cout
// c.printFraction();
cout
cout
// d.printFraction();
cout
cout
x = c * d;
// x.printFraction();
cout
cout
// c.printFraction();
cout
cout
// d.printFraction();
cout
cout
x = c / d;
// x.printFraction();
cout
cout
// c.printFraction();
cout
cout
cout d ) ? " > " : "
// d.printFraction();
cout
cout operator ";
cout = " );
// d.printFraction();
cout
cout
return 0;
}
2. Have Frac2.h and your implementation file Frac2.cpp in your answer, Thank you
. In Frac.h, replace the methodes addition( const Fraction & ),subtraction(const Fraction&), multiply(const Fraction &); divide(const Fraction &); void printFraction0: by overloading operators +, , ,/, andStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started