private static boolean endsWithCVC(String str) {
    char c;
    char v;
    char c2;
    if (str.length() >= 3) {
      c = str.charAt(str.length() - 1);
      v = str.charAt(str.length() - 2);
      c2 = str.charAt(str.length() - 3);
    }
    else {
      return false;
    }

    if ((c == 'w') || (c == 'x') || (c == 'y')) {
      return false;
    }
    else if (isVowel(c)) {
      return false;
    }
    else if (!isVowel(v)) {
      return false;
    }
    else {
      return !isVowel(c2);
    }
  }
private static boolean endsWithCVC(String str)