Midterm Study Topics You should bring a calculator. TOPICS Explain the tradeoff between algorithms and data structures. Recite the definition of ADT. Know how ADT's are created in Java. Be able to give an example of an ADT from a class project. Recite the four benefits of ADT's, and give a brief explanation of each. Explain the first criteria for choosing/designing an ADT. Choose the best ADT for representing some real world entity and justify your choice. Choose between a static or dynamic implementation for some data structure/problem. Be able to justify your choice, referring to the characteristics/benefits of each alternative. Given some empirical data from test runs for an algorithm, extrapolate to predict for some larger N. Given the equation for running time of an algorithm and a sample data point, predict for some other value of N. E.g., 5.14, 5.15 Given two functions, f(x) and g(x), find the crossover point (when f(x) = g(x)). Determine the Big O for an expression. Describe the Big O of the running time for a given program segment. E.g., 5.20, 5.29 Be able to write an algorithm that uses a lookup table. Given a sequence of input items and a diagram of the finished stack, write the sequence of operations on the stack that would produce the desired state. Evaluate a postfix expression using a stack. Write a program that uses a stack or queue to solve a problem. Pattern problem. E.g., 5.22, 5.23 Analyze an algorithm from its description and give the worst case running time (Big O). E.g., 5.39, 5.43 Analyze an inefficient algorithm and describe how it could be modified to improve the running time. E.g., 5.28 Given a code segment that manipulates a binary tree, draw a diagram of the tree that results. Given a diagram of a binary tree, write a code segment that invokes the operations necessary to build the tree. Given a diagram of a binary tree, give the order the nodes would be visited during each of pre-order, in-order, and post-order traversals. Given a list of items to be inserted into a binary search tree, draw a diagram of the tree that results. Given a diagram of a binary search tree, draw the tree that results from a remove operation. Enums, Generics, Collections, and Iterators. Be able to write a JUnit test for a value-returning method that produces 100% decision coverage. Recursion problems like the homework and labs. Be able to convert a functional-oriented implementation into an object-oriented one following the principle of "distribution of intelligence" to decompose the code into appropriate classes. Be able to perform a "code trace" of a Java program. Be able to apply the class coding standard to improve poorly written code. Be able to apply the class algorithm design guidelines to improve unmaintainable code. Given an algorithm or Java code segment that is inefficient, be able to improve the performance by modifying the algorithm or using a different data structure. Practical Problem (during lab, written or on computer) An implementation problem like the lab activities or projects, or chapter exercises. Be able to use an external Jar file provided by the instructor in your project. --- Exam Policies --- Written Exam Calculators are allowed, but not phones. Write neatly in pencil. You may be assigned a specific seat. Anticipate that you may be asked to deposit your backpack, purse, etc at the front of the room. Anticipate that bathroom breaks will not be allowed. Please ask the instructor for assistance if a question is ambiguous or you aren't sure how to get started. The point value of each question is shown on the exam in parentheses. No hoodies or earphones. If you arrive so late that the first person has already finished the exam you won't be given an exam. The instructor will announce "time's up" at which point you should quickly submit your paper. If the instructor leaves the room and your paper isn't in his possession you get a zero. Practical Exam (in computer lab) The practical is worth 25% of your midterm grade. If you leave the room with the exam paper in your possession you get a zero. Save your work frequently. Coding style isn't graded by Web-CAT. You may consult a physical copy of the Weiss textbook. Login only to your own account. You may have open only a single browser window for Web-CAT. No online javadocs or other references. You may not refer to any previous labs or programs. You must use the lab workstations not a personal notebook computer. Prior to lab be sure you have sufficient disk quota and that your account is in good working order. You are expected to be competent with the tools we have been using during lab. Web-CAT will close for submissions promptly at the end of the hour.