1. [15 points] Write a complete header file for the String class based on the example used in Chapter 8 of the textbook. Your class declaration is to include all data members, but only the following function declarations. Do not write any function definitions yet!
2. [5 points] What must you do immediately after you invoke the new operator in a C++ program, and why?
3. [10 points] Write the C++ code to do the following:
4. [5 points] Explain how the C++ operator that frees memory for an array (as in 3c) can determine how much memory is to be freed.
5. [10 points] Write the function definition for answer 1d (the String concatenation operator with a String object as right operand).
6. [10 points] Assume the class Complex has been defined as in the exercises for Chapter 8. Write a complete main() function that prompts the user to enter a Complex number (indicate the proper format for the number in the prompt), input the Complex number, multiply it by the complex number (3.4 + 4.5i), and display the result.
Your main() function must include all variable declarations, and must use overloaded operators for input, multiplication, and output.
7. [15 points] Assume Base is a base class, and Derived is derived from Base. Given the following code:
Base baseObj, *basePtr;
Derived derivedObj, *derivedPtr;