method for checking if nfa accepts an input string
added test file for testing the nfa class structure and methods