In the Election Results programming example, the object candidateList of type unorderedArrayListType is declared to process the voting data. The operations of inserting a candidate’s data and updating and retrieving the votes were somewhat complicated. The member variable list is a protected member of candidateList, and each component of list is a private member. To update the candidates’ votes, copy each candidate’s data from candidateList into a temporary object of type candidateType, update the temporary object, and then replace the candidate’s data with the temporary object. In this exercise, you are to modify the Election Results programming example to simplify the accessing of a candidate’s data. Derive the class candidateListType from the class unorderedArrayListType as follows:
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.