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

please i need this asap

C++ Data Structure

please i need this asap C++ Data Structure Question 8 3 pts

Question 8 3 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 num / denom; } private: int num, denom; }; Write the code that would go in the implementation file (.cpp) that overloads the >> input operator, so that it reads two inputs from the input stream into the Fraction object's num and denom. The first value should be stored in num and the second value should be stored in denom. Assume the operator was declared as a friend function in the header file and that all necessary include directives/libraries have been added. Edit View Insert Format Tools Table 12pt v Paragraph U A Tv

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!