/**This class cheacks if a word is a Degenerative word with more then 6 constanents and returns a boolian 
* date: January 2016
* @author Kier Lindsay
**/

import java.text.Normalizer;



class DegenCheck {



/** Replaces acented characters with their non-acented equvalents, Source: http://stackoverflow.com/a/15190787 **/
  private static String stripAccents(String s) {
    s = Normalizer.normalize(s, Normalizer.Form.NFD);
    s = s.replaceAll("[\\p{InCombiningDiacriticalMarks}]", "");
    return s;
  }
  //removes all non alphabetic caractes suck as ' or . from the word
  /** Removes all non alpabetic characters, converts to lower case and strips accents. **/
  private static String strip(String word) {
    word = stripAccents(word);
    word = word.toLowerCase();
    word = word.replaceAll("[^a-z]", "");
    return word;
  }
  
  /** Retuens true if a word is a Degenerative word with more then 6 constanents **/
  public static boolean isDegen(String word) {
    //strips the word
    word = strip(word);
    //false untill proven true
    boolean isDegen = false;
    //if the words smaller then 6 chars we dont need to bother
    if(word.length()>5) {
      //remove vowals
      word = word.replaceAll("[aeiouy]", "");
      //if its smaller then 6 chars after removing vowals we still dont have to bother
      if(word.length()>5) {
	//for each constanent in the word (skiping the fist one so we can do (i-1) insted of (i+1))
	//thus avoiding null pointer exeptions
	for(int i = 1; i < word.length(); i++) {
	  if(word.charAt(i) < word.charAt(i-1)) {
	    isDegen = false;
	    //once this is false once we dont have to cheack the rest.
	    break;
	  } else isDegen = true;
	}
      } else isDegen = false;
    } else isDegen = false;
    return isDegen;
  }


}
@@ -10,17 +10,16 @@
 lass che
-a
 cks if a
@@ -64,26 +64,25 @@
  then 6 cons
-ta
+o
 nents and re
@@ -93,17 +93,17 @@
 s a bool
-i
+e
 an %0A* da
@@ -200,17 +200,16 @@
 eck %7B%0A%0A%0A
-%0A
 /** Repl
@@ -215,16 +215,17 @@
 laces ac
+c
 ented ch
@@ -250,16 +250,17 @@
 r non-ac
+c
 ented eq
@@ -260,16 +260,17 @@
 nted equ
+i
 valents,
@@ -597,16 +597,17 @@
  non alp
+h
 abetic c
@@ -1032,17 +1032,16 @@
 se until
-l
  proven 
@@ -1181,17 +1181,17 @@
 move vow
-a
+e
 ls%0A     
@@ -1285,17 +1285,17 @@
 ving vow
-a
+e
 ls we st
@@ -1358,26 +1358,25 @@
 or each cons
-ta
+o
 nent in the 
@@ -1385,16 +1385,17 @@
 rd (skip
+p
 ing the 
@@ -1396,16 +1396,17 @@
 g the fi
+r
 st one s
@@ -1472,16 +1472,17 @@
 inter ex
+c
 eptions%0A
@@ -1638,17 +1638,16 @@
 e to che
-a
 ck the r
@@ -1778,7 +1778,6 @@
   %7D%0A
-%0A%0A
 %7D
+%0A

Update DegenCheck.java