I am wondering what the exclamation mark in if(!anObject) means.
if(!anObject)
It's a C operator, simply meaning "not". So !YES == NO and !NO == YES are both true statements. if (![txtOperator.text isEqualToString: @"+"]), for example, checks to see if txtOperator.text is NOT equal to @"+".
if (![txtOperator.text isEqualToString: @"+"])