Question: Our original bag classes in Chapters 3 - 5 used a typedef to define the Item data type. What problem is solved by using a
Our original bag classes in Chapters used a typedef to define the Item data type. What problem is solved by using a template bag class instead of these original typedef versions?
None of the typedef versions permit a program to use a bag of Strings.
With all of the typedef versions, it is difficult for a program to use several bags with different Item types.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
