CISC370, Summer 2006, Quiz 2 (Total 20 pts +1 bonus) 06/27/2006 TA: Ke Li 1. 3 pts - each blank 1 pt 2. 3 pts - customized - printing 3. 3 pts - shallow copy OK for primitives fields - Need deep copy for pointer fields 4. 2 pts - 2 out of "Map", "Set" and "List" 5. 4 pts + 1 bonus pt - part a: generic Collections 2 pt -- same collection handles any type use term "polymophism" +1pt -- multiple types in one collection - part b: declare type in Collections 2 pt -- compiler type check -- no need cast, simplify code 6. 3 pts - flexibility -- can change implemt w/o affecting other code 7. 2 pts - Comparable: default sorting mechanism - Comparator: special case of sorting -- no direct access to class -- no change default sorting behavior