Question: Given the class DoublyList as seen in the lessons, a friend function has been declared to overload the comparison operator equal (==) to respond to

Given the class DoublyList as seen in the lessons, a friend function has been declared to overload the comparison operator equal (==) to respond to the following code segment: DoublyList listi, list2; // elements are added to both lists... if (listi -- list2) Assuming the class DoublyList has a member variable count that stores the number of elements in a list, which of the following is the most appropriate statement that will check, within the body of the operator== friend function implementation, whether the two lists have the same number of elements? return (count == list2.count); return (count == list2.getCount); return (list1.count == list2.count); O return (list1.count == list2.getCount(); return (list1.getCount() == list2.getCount(); None of the above
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
