Skip to content

Instantly share code, notes, and snippets.

@jcockhren
Last active October 17, 2015 16:53
Show Gist options
  • Save jcockhren/f59307739c525caf8c2f to your computer and use it in GitHub Desktop.
Save jcockhren/f59307739c525caf8c2f to your computer and use it in GitHub Desktop.
Simple Calculator chunk 3 - Calculator Commands

Simple Calculator chunk 3 - Calculator Commands

Goal

Using Test Driven Development, create a Stack class that can hold the last evaluated expression (for lastq) and the last answer returned (for last). Also, modify your Evaluate class appropriatly handle the last and lastq commands.

  1. Ensure your Stack class can easily set the lastq and last (you can name your properties whatever you want)
  2. Prove your Evaluate class can properly handle the lastq and last commands.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment