ITFN 2313 Final Exam Practice – Spring 2008 1. Describe the term inheritance and explain the benefits of it. 2. Create a simple UML class diagram that illustrates a class hierarchy. Write the line of code to indicate inheritance. 3. What is polymorphism? Describe the use of polymorphism in the “monster” lab. 4. What is the output to the screen when the following code executes? static void Main(string[] args) { string letters = "abcdefghijklmnopqrstuvwxyz"; Console.Write("I want to {0}{1}{2}{3}!",letters[15],letters[0], letters[18], letters[18]); Console.WriteLine(letters.IndexOf("stuv")); 5. Using the sting from above, write a snippet of code that finds and outputs the index of the letters “stuv”. 6. Using the sting from above, write a snippet of code that returns the index of any occurrence of the character “a”. 7. Discuss at least three methods of strings and their use. 8. Draw and describe the coordinate system of C#. 9. Draw the output and explain the following code. What would happen if we passed the pen to the drawRectangle method? g.FillRectangle(brush, 90, 30, 150, 90); 10. List and briefly discuss the classes streamReader and streamWriter.