1 define a class student which has a constructor a member variable a member function 5346517

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.

"Get 15% discount on your first 3 orders with us"
Use the following coupon
FIRST15

Order Now