Study Guide for CS 312 Test 3 (15 Aug 2014) The test is comprehensive. You are responsible for all the material that we have covered in class. Refer to the study guides for Test 1 and Test 2. You will not see numerical problems like conversions of numbers from decimal to binary, etc. However, the knowledge of base conversions and operators will be utilized in the problems assigned. Here are some specific topics that you will be tested on: * Given a problem statement be able to write recursive code. Given a recursive method you should be able to tell me what the output will be for a given set of its input parameter(s) and write an iterative version for the method by looking at its output. * Use the algorithms discussed in class on Selection Sort, Sequential Search, Binary Search and Merging * These are methods that you should be able to write using 1-dimensional arrays: - find the max and min elements in the array - find the second highest element in an array - search for an element in an unsorted or sorted array - merge two sorted arrays - add two arrays together - multiply corresponding elements in two arrays and return the sum - determine if two arrays are equal - determine if an array is sorted (either in ascending or descending order) - sort an array - return an array that has the cummulative sum of another array - reverse the elements of an array in place - remove duplicate elements in an array * These are methods that you should be able to write using 2-dimensional arrays: - find the max and min elements in the array - search for an element in the array - find the sum of a particular row in the array - find the sum of a particular column in the array - find the sum of any diagonal in the array - find the sum of two 2-dimensional arrays - reverse either the rows or the columns in a 2-D array - transpose a 2-D array - perform a matrix multiplication * Use the ArrayList class and its methods in problems similar to the array problems listed above * Definition of terms in OOP: abstraction, encapsulation, information hiding, inheritance, polymorphism * Define a class having: - a list of attributes - default and non-default constructors - accessors - mutators - any other method that is called for * Work with arrays of objects, use objects from user-defined classes as input parameters to a method as well as the return type for a method * Explanation of terms like: static, final, abstract, overriding, overloading, hiding (shadowing), runtime (late) binding * UML diagram to illustrate inheritance hierarchy * Write code to set up an inheritance hierarchy. * Explain and illustrate polymorphism through inheritance and polymorphism through interfaces. * Given pieces of code involving objects decide whether they are legal or not and explain why. * Given a programming scenario be able to create a class or classes to represent that scenario. There will be no surprises in the test. It will be strictly based on the topics mentioned in this study guide. The best way to prepare yourself for the test is to write short programs that fulfill the requirements of the bulleted items. I would recommend doing all the Coding Bat problems for Logic-2, String-3, Array-3, Recursion-1 and Recursion-2.