Question: In this assignment, you will implement two dynamic arrays that store objects of the attached Person class. The first, UnsortedPersonList, contains an Add method and

In this assignment, you will implement two dynamic arrays that store objects of the attached Person class.
The first, UnsortedPersonList, contains an Add method and two Get methods, one which gets a target index, and the other which gets a target Person. It will also contain a method called GetSortedList, which returns an IPersonList object.
UnsortedPersonList implements the attached ISortablePersonList interface. When the GetSortedList method is invoked, it will create a SortedPersonList object. GetSortedList will use a sorted copy of the data contained in UnsortedPersonList to populate the SortedPersonList object.
The SortedPersonList object will implement IPersonList, and like UnsortedPersonList, will contain two Get methods, one based on index and one based on Item. The Get method based on item will perform a search using a Binary search.

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 Programming Questions!