Create a C++ program to encapsulate a student. You may use portions of your previous exercises. Try

Question:

Create a C++ program to encapsulate a student. You may use portions of your previous exercises. Try to do this yourself, rather than relying on any online code. You will need this class as a basis to move forward with future examples; now is a good time to try each feature on your own. Incorporate the following steps:

1. Create, or modify your previous student class to fully encapsulate a student. Be sure to include several data members that be dynamically allocated. Provide several overloaded constructors to provide the means to initialize your class. Be sure to include a copy constructor. Also, include a destructor to release any dynamically allocated data members.

2. Add an assortment of access functions to your class to provide safe access to data members within your class. Decide for which data members you will offer a Get Data member () interface, and whether any of these data members should have the ability to be reset after construction with a Set Data member () interface. Apply the const and inline qualifiers to these methods as appropriate.

3. Be sure to utilize appropriate access regions - private for data members, and possibly for some helper member functions to break up a larger task. Add public member functions as necessary above and beyond your previous access functions.

4. Include at least one const data member in your class and utilize the member initialization list to set this member. Add at least one static data member and one static member function.

5. Instantiate a student using each constructor signature, including the copy constructor. Make several instances dynamically allocated using new (). Be sure to delete () each of these instances when you are done with them (so that their destructor will be called).

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer: