3) Write friend function for the following class to overload the > operators. The friend function, input operator (operator >>), should read 5 elements into the array attribute called “grade” for the...


3) Write friend function for the following class to overload the < and="">> operators. The friend function, input operator (operator >>), should read 5 elements into the array attribute called “grade” for the objet and output (operator <) should="" print="" the="" content="" of="" the="" array="" “grade”="" of="" the="" object="" on="" the="">



class Math


   { // put the prototype of the friend functions here



public:



intgrade[5]:


math( )   {for (int i=0, i<10, i++)="" grade[i]="">



// implement the overloaded input operator function



// implement the overloaded output operator function




void main ()


{



Math ObjA;



//your friend function should be able to take care of the following code



cin >> ObjA;



cout <>



Jun 03, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here