CALCULATOR CASE

1 Introduction

	One of those typical days... you're stuck in the election office
	of Tampa, Florida. Counts come in by a electronic stream of clustered
	counts and every now and then a subtraction for "corrective electoral
	measures". The electronic data is then printed and manually counted.
	Aaargh!

	Write a calculator capable of taking a string containing a simple 
	calculation, performing the actual calculation and returning the
	result. Help the people of Florida and make sure their vote counts!

2 Assignment

	Write the implementation of a Calculator called CalculatorImpl. The method of
	this class to be tested is:
	
		public int getTotal(String textLine) throws CalculatorException;
		
	Expected behavior:
	* The String passed has the following format:
	
	  ----+-----> NUMBER -----+--->
	      |                   |
	      +---<-- " + " --<---+
	      |                   |
	      +---<-- " - " --<---+

 	For example: "1 + 3 - 4", "3", "1 + 1 + 1"
	* Parse the String and make sure that the calculation is performed
	  as expected. The text string only contains numbers, pluses and
	  minuses, NO multiplications, divisions etc
	* A null String as input results in a CalculatorException
	* An empty string results in a total of 0
	* All further input conforms strictly to the syntax -- besides the
	  two cases mentioned before (null pointer and empty string) there is
	  no need to build extra checks for faulty input

3. Example

	- Input: null, Output: <CalculatorException thrown>
	- Input: "", Output: 0
	- Input: "1 + 7", Output: 8
	- Input: "1 + 3 - 4", Output: 0

4. Tips

	* There is a ready-to-use parser in Java

Good luck!
