Create a class and name it MyArray. This class must have aninternal array of integers and the consumer should specify themaximum capacity when instantiating. MyArray class must providefollowing functions:
1- insert: This method receives and integer and inserts into thearray. For simplicity you can assume the array is large enough andnever overflows.
2- display: This method displays all integers stored in thearray in the same order as they are inserted (first in firstout).
3- reverseDisplay: This method displays all integers stored inthe array in the reverse order as they are inserted (first in lastout).
4- getMax: This method returns the maximum value stored in thearray.