@@ -0,0 +1,415 @@
+public boolean catDog(String str) %7B%0A  int catCount = 0, dogCount = 0;%0A  for (int i=0; i%3Cstr.length()-2; i++) %7B%0A    char a = str.charAt(i), b = str.charAt(i+1), c = str.charAt(i+2);%0A    if (a == %22cat%22.charAt(0) && b == %22cat%22.charAt(1) && c == %22cat%22.charAt(2))%0A      catCount++;%0A    else if (a == %22dog%22.charAt(0) && b == %22dog%22.charAt(1) && c == %22dog%22.charAt(2))%0A      dogCount++;%0A  %7D%0A  return catCount == dogCount;%0A%7D%0A

Create catDog.java