Define implementation of Bag class