This project involves the design from scratch of a system to parse and play ABC files. For example, ^F1/2 is an F-sharp half-note, is a C-major chord, (3_AB^C is A-flat, B, and C-sharp played in a triplet, and z is a quarter-note rest. Project 1: ABC Music PlayerĪBC is a music notation that can be encoded in a standard text file. This involves defining a Sudoku class and it rep invariants, converting Sudoku into a logical expression in conjuctive normal form, solving that expression through a recursive backtracking algorithm, and then converting the solution into a completed sudoku puzzle. Problem Set 4: ImmutabilityĬontra PS3, in this problem set we use immutable objects to design a SAT solver for Sudoku. Students of 6.001 or readers of SICP will recognize the similarity between this project and the piece de resistance of that course, the design of a Scheme interperter. Mutability enters with the Lexer object, which is mutated as each call to its next() method peels off another token. The third piece is an evaluator that takes the parsed expression as input and returns an answer in appropriate units.
The second part is a recursive descent parser that converts this stream of tokens into a tree structure that reflects the order of operations. In this example, the tokens would be (, 3PT, +, 2.0, ), /, and 5. If a user enters (3PT+2)/5, then the Lexer converts this into an object that returns the tokens of this expression via its next() method. The first is a Lexer that converts user input into a stream of tokens. To illustrate, we design a simple calculator interpreter than can handle unit conversion as well as standard arithmetic.
Application allows user to play notes on keyboard, change instruments and octaves, and record and play back notes. Use state machines to design a midi piano. Write method specifications and tests for those specifications. Problem Set 2: Specifications and designing with state Wrote classes to convert digits of pi between bases, express digits in base-26, convert base-26 digits into characters, and ultimately find English words in the resulting string of characters. Write black-box tests based on specifications, prior to writing code. Wrote class to parse course homepage HTML, extract'Course Element' headers, and return a boolean to indicate whether a given string was among course elements. Setup environment and learn syntax and Java project structure.
#The visitor returns 2011 mutation software
Solutions to the Fall 2011 iteration of the MIT Course Elements of Software Construction.