CIS1068 FIVE MINUTE TEST #9 (15 minutes) April 20, 2010 (10) 1. Class B extends class A. Indicate what assignments are legal. If not legal try to correct them. A x = new A(); A y = new B(); B z = new B(); B w = y; (5) 2. Given the declaration Object x = new Fraction(4,5); what is the dynamic type of x, what its static type? (5) 3. Give an example of an abstract class (5) 4. Give an example of an interface (10) 5. Given the array {7,3,4,8,2,1,6,5} show its content after each pass of the mergesort algorithm. (15) 6. Implement the method public static ArrayList diff(ArrayList a, ArrayList b) which returns an arraylist consisting of all the strings that appear in a but not in b. [The method indexOf is defined for Arraylists.]