Question: please i need this asap C++ Data Structure Question 7 4 pts Refer to this header file for the following question: // Fraction class //
please i need this asap
C++ Data Structure

Question 7 4 pts Refer to this header file for the following question: // Fraction class // This class represents a fraction a / b class Fraction { public: // Constructors Fraction(); // sets numerator to 1 and denominator to 1 Fraction(int num, int denom); // Setters void setNumerator(int num); void setDenominator(int denom); // getters int getNumerator(const {return num; } int getDenominator(const {return denom;} double getDecimal({return static_cast_double> num / denom; } private: int num, denom; }; Write the code that would go in the implementation file (.cpp) that overloads the + operator. Assume it is defined as a friend function in the header file and that all necessary include directives/libraries have been added. When you add the two fractions, you should come up with a common denominator. Example: 4/ 2 + 3/4 = 16/8 + 6/8 = 22/8. This operation should return a new fraction with the correct total. Note: You do not have to come up with the least common denominator Edit View Insert Format Tools Table 12pt Paragraph B 1 U Av Tv
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
