CS130 - 3/9/2011

  1. Steps in programming
    1. Identifying an need/task for a program
    2. Understanding the task/problem
    3. Developing an algorithm/approach
    4. Evaluating that algorithm/approach
    5. Implementation
    6. Debugging
  2. The pythagorean theorem, and PS
  3. Extra credit programming -- Prime numbers!; subproblem, decide if one pile of coins is an even multiple of another
  4. A Design for the coins problem
                while (more stacks to sort) {
                    move tallest stack all the way to the east (past a gap)
                    shift the stacks to eliminate the gap where the tallest was
                }
                shift the sorted stacks up against the west wall
                    
  5. Task: shift all the stacks one block east (first assuming they are all up against the west wall, then either that or there is a gap at the left)
  6. Lab demos/assistance