[Texas PLT logo]

COMP 202: Principles of Object-Oriented Programming II

  Exam Resources  

These lists should be considered a partial lists at best!  Check back often to see if new items are added.   You are responsible for all topics covered in class, labs and assignments, even if they do not appear here.

 

Midterm Exam: Need to Know

  1. Linear structures
    1. Know how to use both the immutable IList and the mutable LRStruct frameworks.
    2. Be able to write both forward and reverse accumulation algorithms.
    3. Be able to write higher order functions (algortithms/visitors) such as FoldL and FordR.
      1. Be able to write the lambda functions that work with FoldL and/or FordR to do things like add the elements, print the elements, reverse the list, append the list, etc.
  2. Lazy evaluation
    1. Understand and be able to program the decorator design pattern.
    2. Be able to write an ALazyEval to create simple infinite lists, e.g. arithmetic sequences, Fibonnacci sequence, etc.
  3. Trees
    1. Be able to use and write algorithms for BiTrees.
    2. Be able to write lambda functions for both pre/in/post-order traversals and breadth traversals.
  4. General design
    1. MVC design pattern
    2. Decoupling of parts of a system by breaking into autonomous pieces
    3. Utilizing abstract behaviors
      1. Commands
      2. Strategies
      3. Factories
      4. Lambdas
  5. General hints
    1. When a data structure is immutable (e.g. IList), share parts that are the same. Assume you have a visitor that returns a list with the Integer in the first incremented by one. You should let the lists (3 (2 (1 empty))) and (4 (2 (1 empty))) share the rest (2 (1 empty)).
    2. When a data structure is mutable (e.g. LRStruct or BiTree), clone the rest! When you implement the visitor above, the LRStructs two (3 (2 (1 empty))) and (4 (2 (1 empty))) should not share the rest (2 (1 empty))!

Midterm Exam: Solutions

Midterm Exam: Extra Credit

Midterm Exam: Extra Credit Solution

Midterm Exam: Resources

 

 

Final Exam: Need to Know

  1. Dictionaries & Hashing
  2. Self-Balancing Trees
  3. Parsing
    1. Extended Visitor Framework
    2. Tokenizer setup
    3. Parsing using TerminalSymbolFact, CombinationFact, SequenceFact, MTSymbolFact and ProxyFact
    4. Parse Tree-To-Model translation
  4. Games for Two
    1. MinMax
    2. Alpha-Beta Pruning
  5. Sorting
    1. General divide-and-conquer framework
    2. Insertion sort, selection sort
    3. Merge sort, QuickSort
    4. Heaps and heap sort
  6. This is a comprehensive final - you need to know the material from the first half of the course too.

Final Exam: Resources

Final Exam: Instructions

The final exam will be available for download on OWL-Space on December 10. It will appear in the Assignments list as "Exam 2", with an attachment called exam2f08.zip. That zip file contains both the exam (in Microsoft Word doc format and pdf format) and the supporting code.

If you have any problems accessing the exam, please let us know!

Instructions for the exam:

  1. This is an open-notes, open-book, open-computer, open-Internet, take-home exam.
  2. You have 5 hours to work on this exam.
  3. You may also take one contiguous 15-minute break during the exam, and that time will not count towards the 5 hours.
  4. Except for the 15-minute break, this exam has to be taken in one sitting.
  5. Please make sure you have all 9 pages of this exam.
  6. This exam is comprehensive.
  7. You will not be penalized on trivial syntax errors, such as a missing parenthesis. Multiple errors or errors that lead to ambiguous code will have points deducted, however.
  8. In all of the questions, feel free to write additional helper methods to get the job done.
  9. The emphasis is on correctness of the code, not efficiency or on simply generating the right result.
  10. You are free to use any code that was given to you in the lectures and labs.
  11. Code should be generic whenever possible.
  12. When you are done, create a zip file of all your source code and this edited exam, and submit it on OWL-Space by the end of the exam period (Wednesday, December 17, 2008, 11:59 PM).
  13. Do not discuss this exam with anyone other than the instructors or the teaching assistant until after the exam period is over.

Final Exam: Solutions

  Exam Resources  

URL: http://www.cs.rice.edu/teaching/202/08-fall/examresources/index.shtml
Copyright © 2008-2010 Mathias Ricken and Stephen Wong