For clarification, here is a what you need to do to complete your first homework assignment:
- Write unit tests for
- parsing single digits
- interpreting an addition of those digits and computing the correct result
- interpreting subtraction, multiplication, and division
- correctly computing order of operations (“Punkt vor Strich”)
- parsing parentheses and interpreting them recursively (hint: separate parsing of factors, terms, and expressions)
- Once your tests are in place (and you have a red bar), start to implement the functionality required for each test. Start with the simple tests and approach the complicated ones from there, just as it was shown in the lecture.
- A GUI for the interpreter is not required, but you may add one if you like.
- To submit your homework, join the GForge project (see my previous entry on this page). I will contact you once your CVS is ready. Commit your project to CVS from Eclipse using Team/Share project.
Feel free to ask me if you have any questions. If the CVS doesn’t work or you have problems using it, you can submit your homework via Email.