Part 1: The Heap Class
Create a Java class for the Max Heap data structure. Implement the heap as an array. You will needto keep track of the heap size with a private variable. Implement an adequate constructor and agetter method for the size.
Part 2 Insertion
Implement the insertion method as described in the slides. Make sure the method works properlyand that it can handle all situations (like when the capacity of the array is reached).
Part 3: Deletion
Implement the deletion method as described in the slides. Make sure it works properly and that itcan handle situations when the heap has 0, 1, or more elements.