|
| 1 | + |
| 2 | +The examples directory contains a few small and not so small |
| 3 | +example programs which illustrate various aspects of the Cool |
| 4 | +programming language. |
| 5 | + |
| 6 | + arith.cl Tests various aspects of arithmetic in Cool. |
| 7 | + |
| 8 | + atoi.cl An implementation of the C function by the |
| 9 | + same name. It converts a String into an Int. |
| 10 | + |
| 11 | + atoi_test.cl An example program using atoi.cl. Since you |
| 12 | + will most likely use atoi.cl in the first |
| 13 | + assignment, you should study this example. |
| 14 | + |
| 15 | + list.cl A very simple program showing how to create a |
| 16 | + list data type for integers. It illustrates |
| 17 | + inheritance and dynamic dispatch. |
| 18 | + |
| 19 | + book_list.cl Illustrates inheritance and in particular the |
| 20 | + mechanism of STATIC DISPATCH and the CASE |
| 21 | + statement. |
| 22 | + |
| 23 | + cells.cl Models a one-dimensional cellular automaton. |
| 24 | + |
| 25 | + cool.cl An short and obscure program. |
| 26 | + |
| 27 | + io.cl Shows how to use the IO class. (input/output) |
| 28 | + |
| 29 | + hairyscary.cl Exercises many of the obscure features of the |
| 30 | + language in obscure ways. |
| 31 | + |
| 32 | + hello_world.cl The classic first program. |
| 33 | + |
| 34 | + primes.cl An unusual prime number generator. |
| 35 | + |
| 36 | + graph.cl A program reading descriptions of weighted- |
| 37 | + directed graphs from stdin in text format. |
| 38 | + |
| 39 | + g1.graph A sample input to graph.cl |
| 40 | + |
| 41 | + palindrome.cl Recognizes palindromes. |
| 42 | + |
| 43 | + complex.cl Checks the = operator and cummulative effects of |
| 44 | + method calls via a complex number object. |
| 45 | + |
| 46 | + life.cl The classic Game of Life |
| 47 | + |
| 48 | + sort_list.cl A more complex example sorting lists of integers. |
| 49 | + |
| 50 | + |
0 commit comments