C++
Implement the array based Binary Heap data structure asdiscussed in class. This structure should have a couple ofconstructures (default constructor, and a constructor that takes anarray pointer and a size), a method for inserting items into theheap, a method for removing items from the heap, and a method thatreturns the number of items currently stored in the heap. Thisimplementation should be templated so that it can store any type ofdata (you may assume that the <, >, ==, <=, and >=operators are implemented for the type of data being stored). Theconstructor that takes parameters should set the data structure touse the array passed in as the array for the heap, and then\"insert\" each item in the array to the heap. You should also throwexceptions where it makes sense to and for the insert method, youshould handle the overflow case by increasing the size of thestorage. Â Â Remember this should be implemented usingObject Oriented Programming principles