Question: Write a template-based class Group that implement a set of items. A group is a set of items in which no item occurs more than
Write a template-based class Group that implement a set of items. A group is a set of items in which no item occurs more than once. Internally, you use vector to represent the group. In your Group template class, please define and implement the following member functions:
default constructor
search() to return whether an item is already in the group i.e., a Boolean type
insert() to add a new item to the group. If the item is already in the group then nothing happens.
size() to return the size of the group, i.e., number of items in the group
Step by Step Solution
There are 3 Steps involved in it
Answer Certainly Below is a templatebased C implementation of the Group class that represents a set ... View full answer
Get step-by-step solutions from verified subject matter experts
