1. Write a recursive function that takes in two numbers, x and y, and calculates the power (i.e. x raised to the y). 2. What is the return value of the following code if called as f(-4): int f (int x) { if (x > 10) return x; else return x + f(x+3); } 3. What is the output of the following code: void f(string s) { if (s.length() == 0) Console.WriteLine("yo"); else { Console.WriteLine("bye"); f(s.substring(1)); } } 4. Explain how the example we did in class about monsters (skeleton, dragon, etc.) demonstrated inheritance. Draw the relationship between each class we developed. 5. Explain how we maintained a collection of skeletons and dragons in our in-class example and how this demonstrated polymorphism. 6. Assuming you have a class as defined below: class TreeNode { int data; TreeNode left; TreeNode right; } Draw what memory would look like after running the following code. Be sure to label what is in the stack and what is in the heap. TreeNode root; root = new TreeNode(); root.data = 42; root.left = new TreeNode(); root.right = new TreeNode(); TreeNode temp = root.left; temp.right = new TreeNode(); temp.data = 3; root.right.data = 9; temp.left = root;