1. Define inheritance. 2. Why do we use inheritance in C++? In other words, why is it useful? 3. Give an example of inheritance. 4. Write simple code to show how you define inheritance in C++. 5. What specific things does using inheritance in C++ allow ? ---- Questions 6-9 are based on the description below: Consider a class Shape with a derived class Quadrilateral. /* Defining public members is generally bad design, we will ignore that for this question */ class Shape { public: int num_edges; // eg 3 for triangle, 4 for rectangle etc... Shape(int edges):num_edges(edges) {} }; class Quadrilateral : Public Shape { public: int type; // Rectangle = 1, Square = 2, Rhombus = 3 Quadrilateral(int qtype, int edges): Shape(num_edges), type(qtype) {} }; 6. Define a class Rectangle that derives from class Quadrilateral. 7. Define two member variables, length and breadth for this class. 8. Now, define a constructor for this class that will call its base class. 9. Now, find out what the following statement will print: int main() { Rectangle rect; cout << sizeof(rect); } --- 10. Think about what the following class with print: class EmptyClass { }; int main() { EmptyClass empty; cout << sizeof(empty); } Did the class print what you expected? Explain your answer. 11. Explain protected inheritance.