public string checkWord(string word) { string check; verb isVerb = new verb(); noun isNoun = new noun(); adjective isAdjective = new adjective(); pronoun isPronoun = new pronoun(); conjunction isConjunction = new conjunction(); adverb isAdverb = new adverb(); determiner isDeter = new determiner(); for (int i = 0; i < 9; i++) { check = isVerb.checker(i, word); if (check.Equals(word)) { } else { setReturnVal(check); break; } check = isNoun.checker(i, word); if (check.Equals(word)) { } else { setReturnVal(check); break; } check = isAdjective.checker(i, word); if (check.Equals(word)) { } else { setReturnVal(check); break; } check = isPronoun.checker(i, word); if (check.Equals(word)) { } else { setReturnVal(check); break; } check = isConjunction.checker(i, word); if (check.Equals(word)) { } else { setReturnVal(check); break; } check = isAdverb.checker(i, word); if (check.Equals(word)) { } else { setReturnVal(check); break; } check = isDeter.checker(i, word); if (check.Equals(word)) { } else { setReturnVal(check); break; } } if (getType().Equals("dno")) { setReturnVal("Unknown"); }; return word; }
public string checkWord(string word) { string check; verb isVerb = new verb(); noun isNoun = new noun(); adjective isAdjective = new adjective(); pronoun isPronoun = new pronoun(); conjunction isConjunction = new conjunction(); adverb isAdverb = new adverb(); determiner isDeter = new determiner(); for (int i = 0; i < 9; i++) { check = isVerb.checker(i, word); if (check.Equals(word)) { } else { setReturnVal(check); break; } check = isNoun.checker(i, word); if (check.Equals(word)) { } else { setReturnVal(check); break; } check = isAdjective.checker(i, word); if (check.Equals(word)) { } else { setReturnVal(check); break; } check = isPronoun.checker(i, word); if (check.Equals(word)) { } else { setReturnVal(check); break; } check = isConjunction.checker(i, word); if (check.Equals(word)) { } else { setReturnVal(check); break; } check = isAdverb.checker(i, word); if (check.Equals(word)) { } else { setReturnVal(check); break; } check = isDeter.checker(i, word); if (check.Equals(word)) { } else { setReturnVal(check); break; } } if (getType().Equals("dno")) { setReturnVal("Unknown"); } ; return(word); }