Question: [40 points] Given the below head file for bag class, we want to implement only the bool operatorbag& bi, bag& b2). The operator checks whether
![[40 points] Given the below head file for bag class, we](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66f53a8404033_33166f53a83648ec.jpg)

[40 points] Given the below head file for bag class, we want to implement only the bool operatorbag& bi, bag& b2). The operator checks whether two bag objects are the same or not regardless of the order. For example if bl-[1,2,2,3 and b2 [2,3,1,2] the operator returns true. You do not need to implement any other functions. Hint: you can use the non-member sorting function void sort (bag& b) in head file below to sort the elements in each bag object and then compare them one by one to decide whether two bags are the same or not. You do not need to implement the sort function
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
