wrote Java doc
added error detecting routine to equation and monomial