CS62 - Spring 2011 - Lecture 42

  • Why C++
       - C++ is still very common
       - space efficient
       - operator overloading is pretty cool
       - pre-processor
       - accessor vs. mutator method distinction
       - multiple inheritance

  • a look back
       - ?? lines of notes (~150 pages)
       - ?? lines of demo code
       - ?? lines of assignment code
       - ?? pages in the Java book
       - learned C++!
       - look at Bursti project (http://saras.cs.pomona.edu/bursti/)
          - only prerequisite was cs62
          - final project with 13 students working on it:
             - ~40 classes
             - >5000 lines of code
          - a working search engine

  • some example questions to look can be found here

  • also, see the "Exam" section of the course web page for an example final

  • review
       - general coding
          - commenting
             - JavaDoc
          - coding style
          - constants
          - what is meant by:
             - public/private
             - static
             - final
             - super
          - assert
          - inheritance and interfaces
          - equals vs. ==
          - OO programming
             - design and functionality vs. implementation
             - method signature
          - generics

       - general concepts
          - binary search
          - basic graphics in Java
          - iterators
             - Iterator interface
             - Iterable interface
          - operators
             - bitwise operators
             - ternary operator

       - complexity analysis: big-O

       - sorting
          - mergesort
             - merge method
          - quicksort
             - partition method
          - insertion sort
          - selection sort   

       - data structures
          - Know
             - how they're represented
             - how they're used
             - what they're good at/bad at
             - different implementations
             - run-times
          - arrays and vectors/arraylists
          - linked lists
             - singly linked
             - circularly linked
             - doubly linked
             - modified version (i.e. with current pointer)
          - linear structures
             - stacks
             - queues
          - binary trees
             - tree terminology
             - tree traversal
                - bfs
                - dfs
             - binary search trees
             - balanced trees
          - heaps and priority queues
          - hash tables
             - hash functions
             - hashCode()
             - collision resolution by chaining
             - open addressing
             - maps

       - concurrency and parallelism
          - shared memory model
          - Thread class
          - fork/join
          - thread pool
          - analyzing parallel algorithms
             - calculating possible speed-up
             - calculating actual speed-up
          - locks/synchronization
             - data races

       - graphs
          - types
          - terminology
          - representation
             - adjacency list
             - adjacency matrix
             - trade-offs
          - algorithms
             - dfs
             - bfs
             - cycles
             - connectedness and connected components
             - shortest paths (Dijkstra's)
       
       - C++
          - programming in C++
          - preprocessor
             - #include
             - #ifndef ...
          - using namespace
          - use of built-in classes
             - vector
             - string
             - list
             - map
          - defining classes
             - header file usage
          - compiling
          - parameter passing
             - call-by value
             - call-by reference
             - call-by constant reference
             - how Java does it
          - memory and memory management
             - stack vs. heap
             - delete
          - pointers
             - *, &, ->, .
             - usage
          - iterators
             - iterating over STL data structures
          - the big three
             - copy constructor
             - operator=
             - destructor
          - initializer lists
          - operator overloading
          - templates
             - function
             - class
          - inheritance
             - virtual
             - dispatch approaches
          - default parameters