What changes need to be made to the following class in order to change it to a template class?
class containerClass
{
public:
containerClass();
containerClass(int newMaxSize);
containerClass(const containerClass& source);
~containerClass();
int getItem();
int getCount();
int getSize();
void addItem(int item);
private:
int *bag;
int maxSize, count;
};
a. add the template prefix
b. change all occurrences of int to T
c. change the parameter type of addItem to T
d. change the return type of getItem to T
e. change the return type of getSize to T
f. change the parameter type of the implicit constructor to T
g. A and B
h. A and C and D
i. A and C and D and F
h. A and C and D
You might also like to view...
The ________ attribute specifies how long the animation lasts in milliseconds.
a. android:duration b. android:length c. android:playbackTime d. android:time
The specific purpose of the digital forensics professional is to gather ____________________ evidence that supports any investigation of wrongdoing involving a computer device.
Fill in the blank(s) with the appropriate word(s).