Use the following code segment for your answers to two questions below: (C++) co
ID: 3645340 • Letter: U
Question
Use the following code segment for your answers to two questions below: (C++)const int SIZE = 5;
template< class T >
class Mystery
{ public:
private:
T *what;
};
int main( )
{ int grades[ ] = { 100, 90, 87, 89, 60}; // LINE 1
Mystery object( grades); // LINE 2
cout << object << endl; // LINE 3
}
Questions:
1. The code on LINE 2 in the main() is supposed to copy all array elements of grades to the *what that is used as an array.
What is missing in the class Mystery? Come up with the implementation inside the class.