Add the methods insert and remove to the Array class. These methods should use the strategies discussed in this chapter, including adjusting the length of the array, if necessary. The insert method expects a position and an item as arguments and inserts the item at the given position. If the position is greater than or equal to the array’s logical size, the method inserts the item after the last item currently available in the array. The remove method expects a position as an argument and removes and returns the item at that position. The remove method’s precondition is 0 <= index=””>< size().=”” the=”” remove=”” method=”” should=”” also=”” reset=”” the=”” vacated=”” array=”” cell=”” to=”” the=”” fill=””>
#Sales Offer!| Get upto 25% Off: