Skip to content

Instantly share code, notes, and snippets.

@jcockhren
Last active February 20, 2016 13:49
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jcockhren/e80dc84e9ee32bdd3f9c to your computer and use it in GitHub Desktop.
Save jcockhren/e80dc84e9ee32bdd3f9c to your computer and use it in GitHub Desktop.
Simple Calculator chunk 1 - Parsing Text

Simple Calculator chunk 1 - Parsing Text

Goal

Using Test Driven Development, create a Parse class that will break down a simple 2-term calculator expression.

  1. Prove you can extract the terms of the expression.
  2. Prove you can extract the operation embedded in the expression.
  3. Ensure you have examples of GOOD and BAD input and have the class throw an exception where there are error.

Hints

  • Your expression should work with and without spaces.
  • The use of Regular Expressions is not required.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment