Complete the following tasks:
a. Create a class named Teacher that holds a Teacher’s first and last names and the grade
level the Teacher teaches. Include a constructor function that uses default first and last
names, such as “ZZZZZZZ” and a default grade level, such as 0, when no arguments are
provided.
b. Create a class named Student that hold’s a Student’s first and last names. Include a
constructor function that uses default first and last names, such as “ZZZZZZZ,” when no
names are provided.
c. Create a class named Classroom. A Classroom holds a Teacher and an array of 35
Student objects.
d. Create a class named School. A School contains an array of 100 Classroom objects.
(This class is being designed to be a very large class, to more quickly demonstrate running
out of memory.)
e. In a main()demonstration function, declare a pointer to an array of 500 School objects
and include code to handle any memory allocation errors that occur. In a loop, declare 500
array objects at a time, continuing to rewrite the main()function if necessary until you
create enough School objects to cause a memory allocation exception. (Hint: You might
want to display a count periodically to assure yourself that the School objects are being
created.) When memory is exhausted, display an appropriate message and terminate the
application. Save the file as School.cpp.