1. Replace typeid with dynamic_cast to provide a single statement instead of two different typeid statements in Problem 4.
2. Recall Problem 1 of Chapter 10 and defi ne objects of all three (time) classes. Use dynamic_cast to provide proper casting. Display error messages when proper casting cannot be done.
3. Replace dynamic_cast with typeid in Problem 4 and rewrite the program.
4. Write a program that takes the names of two different classes and gives the response ‘Yes’ when one class is inherited from the other; otherwise, the response is ‘No’.