CS 448 Lecture - Java abstraction and coding

Topics for today:
  1. Reading --C11, C12: Active symbols, levels, emergence, reductionism, unnatural selection
  2. Coding!
    1. Principles
      1. Legible, Flexible, Robust
      2. A class shouldn't know anything it doesn't have to. Huh?
    2. Some examples
      1. Debug
      2. PtronRunner: initializing arrays
      3. PatternList
      4. Ptron1 & Util
      5. Util again (a rewrite of Util using PatternList
  3. Groups: a Minimaxible interface
    1. Want to write a Move minimax(Minimaxible) method that would work for any game that implements Minimaxible
    2. What methods will your minimax method need?
    3. Enter your interface in /home/dante/faculty/levenick/public_html/cs448/examplesFromClass/MinimaxibleExercise/src/MinimaxibleN (where N is your group number) so we can all look at them
  4. Abstract classes in Java
    1. Makes it possible to abstract commonalities from two (or more) classes.
    2. Like interface, makes it possible to require certain methods to be implemented. Each signature is preceded by abstract; each must be overridden in subclasses (which are not themselves abstract).
    3. Methods may be implemented in the abstract class; if they are not overridden in a subclass when sent to the subclass object the superclass method is executed.
    4. Can declare variables in abstract classes
    5. Cannot instantiate!
    6. Classes may only extend one other class
    7. Parameter types may be abstract
  5. Vehicles demo?
  6. Learning to play go?