shampouya
asked on
What does the word implementation mean with regards to generics?
My textbook says "An important mechanism that supports code reuse in object-oriented programming is the generic mechanism. If the implementation is identical except for the basic type of the object, a generic implementation can be used to describe the basic functionality."
What does implementation mean in this context?
What does implementation mean in this context?
In simple words, its like the base class to the derived classes. Common functionality is moved to the base class, and only extra (remaining) one can be placed in the derived class.
they mean that two methods which essentially are implemented in the same way with the only difference
that different type is used - then it is the case where generics would allow you to reuse the same code,
evben though without the generics you'd have to write a separatr version of the code for each type
that different type is used - then it is the case where generics would allow you to reuse the same code,
evben though without the generics you'd have to write a separatr version of the code for each type
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
thanks