------------------------------------------------------------------------------------ CSE 459.22 Worksheet Worksheet assigned 11/23/2005 Worksheet is due 12/07/2005 11:59 PM EMAIL me the answers to this worksheet to somasund@cse.ohio-state.edu Your score will be emailed back to you. If you miss the last class or the last two classes you have to submit the worksheet. I ENCOURAGE everybody to submit the worksheet. 6 questions: 15 Pts (Will be counted as extra credit) ------------------------------------------------------------------------------------ You can use examples to explain your answers. ------------------------------------------------------------------------------------ 1. What is polymorphism? To get polymorphic behavior in C++, (2 Pts) A) How should the functions be defined? B) What type should the objects/data be manipulated through? 2. What is an abstract class? Why do you need them? What is the difference between classical hierarchies and hierarchies of abstract classes? (2 Pts) 3. How do you you instantiate a function/class template? What happens when a function/class template is instantiated? (2 Pts) 4. When errors occur in the execution of a program, there are different ways to handle it. What is the fundamental idea behind having exception handling capability? When should you avoid using exceptions in error handling? (2 Pts) 5. What is a namespace? (1 Pt) 6. Write code using the Standard Template Library(code should be complete - should compile/run) (6 Pts) - Create a vector of strings, vector and read a list of names into it using the keyboard. Sort the names and print it.