1. Define a class Studentwhich has a constructor, a member variable, a member function, anda destructor. The member variable is an integer type pointer (e.g.int * ptr). In the constructor, use the pointermember and new to dynamically allocate an integer,and assign its value using cin. The member functions isGetSquare(), which is to return the square of theinteger memory’s value through the pointer. In thedestructor, deallocate the integer memory assigned to thepointer.
Declare a variable using Studentin main(), call member function GetSquare() to output the squarevalue.