Data Structures for Grace
Sample Programs
- Animal Game: adaptation of this assignment from Pomona's Data Structures class.
- Calculator: text-based adaptation of this assignment from Pomona's Data Structure's class.
- Calculator takes expressions input in postfix notation and displays the results in standard output
- State keeps track of the current state of the computation
- Structures Library
- Cat Factory: very simple example of Grace syntax.
- Cat Factory classes and types in Grace, def vs var, some use of mix-fix notation and matching
- Cat Factory Example using Cat Factory and Vector, creates list of cats and prints results of various methods over the list (output from terminal). Shows use of import statements, closures, more mix-fix notation and matching.
- Vector
- Matrix Calculator: text-based calculator for performing simple computations (addition, subtraction, scalar multiplication, matrix multiplication, transposition) on matrices.
- Matrix Calculator allows user to edit and perform operations on matrices from terminal
- Math Matrix class of matrices accepting Number type as entries with methods for basic operations
- Silver Dollar Game: text-based version of the game described in this lab from Pomona's Data Structures class.
- Text Generator: adapatation of this assignment from Pomona's Data Structures class, using Vector instead of ArrayList.
- Text Generator asks user to input the name of a text file and prints out word frequency table and random text generated from that file. (Case-sensitive)
- Sample output using Edgar Allan Poe's "Annabel Lee" as the input text
- WFClasses contains helping classes for Text Generator: WordStream, StringPair, and FreqList (described in writeup)
- Stringplus some additional methods for String that may come in handy.
- Random
- Vector
- Association