Question: 16. (10 points) Method implementation. We want to store the contents in increasing (e. non-decreasing (= increasing or equal) order. Please fill in the missing

 16. (10 points) Method implementation. We want to store the contents
in increasing (e. non-decreasing (= increasing or equal) order. Please fill in

16. (10 points) Method implementation. We want to store the contents in increasing (e. non-decreasing (= increasing or equal) order. Please fill in the missing statements or parts and complete each method. NOTE: You implemented the methods as your assignment. Please refer to the UML diagrams on page 2, if needed. (3 points) SortedListArrayBased public int locateIndexToRemove(Object item) for (int i = 0; i > return index: return 3 (2 points) Sorted ListArrayBased (2 points) Sorted ListArrayBased public void remove(String item) public void add(String item) { int index = locateIndexToAdd(item); int index locateIndexToRemove(item); If needed, refer to the following UML diagrams NOTE: (1) Array index starts from 0, not from 1 in ListArrayBased, (2) Notice that a new method, getHead(), is defined in ListReferenceBased and you are asked to use it for some questions > Listinterface *IsEmpty(): Boolean size:int add indexint, item: Object): void +getfindex int): Object +remove(index inte void +removeAll(); void A ListReference Based -head: Node numitems: int ListArrayBased -MAX_LIST: int -Items: Object -numitems: int +ListArrayBased) +isEmpty(): boolean +Size(): int +add[indexint, item: Object): vold *getfindex int): Object +remove(index:int): void +removeAll(): vold +ListReferenceBased +isEmptyo: boolean size(): Int *add indexint, item: Objects: void getfindexint): Object +remove(index int). void +removeAll(): vold getHead():Node Sorted ListArray Based Sorted List Reference Based +Sorted ListArrayBased + add item: Objeet): void +remove(item: Object); void + locatelndex ToAdd(item: Object)int + locatelndex ToRemove(item: Object); int +Sorted List Reference Based) + additem: Object) void + remove item: Object): void + locateIndex ToAdd item: Object); int + locateIndex ToRemove item: Object)int Page 2 of 19

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!