UP | HOME
../../ 2015-06-15

Tiny Programming Examples with a Software Engineering Perspective

Table of Contents

1 Tiny.Tiny Examples of Spec/Design

  1. ./Dutch-National-Flag Correct by Design example by Dijkstra.
  2. ./Quick-Sort Why is it hard to understand and then remember?
  3. ./SmallSet A simple implementation of a set of integers. Shows pre/post and class invariants.
  4. ./Condense-Num-Ranges E.g., given 2 - 9 and 3 -12, condense to 2 - 12. Spec and design.
  5. ./Magic-Squares Construct n x n matrix of numbers so that columns, rows and diagonals add up to the same number.
  6. ./Tabulate-Equations such as a collection from algebra. Spec and design.
  7. ./Telegram-Problem The problem of Peter Naur. Famous people wrote buggy solutions!
  8. ./Worms wiggly worms, some vegetarian, others cannibals. Presented as (i) a software "maintenance" problem, and (ii) as an example of writing assertions.
  9. ./TicTacToe-JavaFX-UnRedo Presented as a software "maintenance" problem. Is it bug free?
  10. ./Game-Of-Life Conway's GoL. Presented as a software "maintenance" problem. TBD Incomplete.
  11. ./Columnize-Words Part of /bin/ls spec.
  12. ./Mark-Error-Pos A required method within a compiler. Position an arrow, and next to it print error numbers.

2 End


Copyright © 2015 • www.wright.edu/~pmateti • 2015-06-15