Question: 6) Show any changes needed to overload the following good.bubble function to sort a vector of Date objects void good-bubble(vector & data, vectorchar>: :size-type start,

 6) Show any changes needed to overload the following good.bubble function

6) Show any changes needed to overload the following good.bubble function to sort a vector of Date objects void good-bubble(vector & data, vectorchar>: :size-type start, vector:: size-type end) vectorchar>: :size-type loop = 0, cur; bool done false; while (loop data[cur+1]) swap(data[cur], data[cur+1]); done false ; loop++ return; You happen to know that the Date class provides the method bool Date::greater (const Date & other) const; (... if this helps). Please show only the [parts of] lines that must change! Suddenly you realize that you'll need one more piece of code for this new sort routine to work! (Hint: It is something that is not a library- or language- provided feature.) (Hmm... but should the missing function be a member or non-member of the Date class?) Show your code for it here 7) Repeat #6 but overload for an array of Date objects. As before, please show only the parts of the code that must change

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!