Define and implement the class SortedArray that holds a sorted data of type Comp
ID: 3646523 • Letter: D
Question
Define and implement the class SortedArray that holds a sorted data of type Comparable (in ascending) and provides insertion, deletion, and other operations. This class must use an expandable array. The array must remain sorted after each operation. Initially the array is empty and of size initialSize. The variable top indicates the index of the last item in the array. If the array is full and you want to insert a new data item, the array size is incremented by incrementAmount locations. This class must include at least the following methods:constructor: receives the values of initialize and incrementAmount, and sets top to