class StringLooper { /** Return how many occurrences of `target` occur in `s`. * @param s the string to search through * @param target the char to count. * @return how many occurrences of `target` occur in `s`. */ int countOccurences( String s, char target ) { int seenSoFar = 0; int i=0; while (i < s.length()) { if (s.charAt(i) == target) { seenSoFar = seenSoFar + 1; } // else do nothing. i = i + 1; } return seenSoFar; } int charToInt( char digit ) { return Integer.parseInt( Character.toString(digit) ); } boolean isValidISBN10( String isbn ) { int checkSoFar = 0; for (int i=0; i