Lab Mid
Lab Mid
(NOTE: Design of class should contain Function prototypes inside the class and definitions outside the class) Create a class called MyClass to represent one single class in a college having four data members an array of 10 char pointers named s_names to store student names, a char pointer to store grades of 10 students , an array of 10 int to store roll no and one char pointer c_name to store a class name. Class should have a default constructor that will perform the following four tasks: Set maximum size of each name to be 15 by dynamically creating all the ten pointers of s_names. Allocate ten characters locations dynamically to store grades using grade pointer. Initialize all the rollnos to 0. Initialize class name to space. Provide a member function setclassname that will receive value from main by user and set it to member c_name. Also provide public set member functions for each remaining members which will receive no parameters and will set values for each member using cin statement. Also provide only one public get function for member c_name. Provide a public function displayall () that will print the complete records including all students roll no, names, grades in column format labeled with the headings roll no, name and grade. Also print the class name on the top of the record by calling member function getclassname() in displayall() function at the top. Provide another function named top Students ( ) that will display the records of only those students that have grade A. If there is no such student then display message that no student in this class (class name) have grade A.