public class ParenCheckTool { // NOTE: checkParens() is written to accept an interface instead // of an actual class. static void check (String inputStr, OurStackInterface stack) { // This code below is complete unchanged from before ... char[] letters = inputStr.toCharArray(); boolean unbalanced = false; for (int i=0; i unbalanced. unbalanced = true; break; } } } if ( (unbalanced) || (! stack.isEmpty()) ) { System.out.println ("String " + inputStr + " has unbalanced parens"); } else { System.out.println ("String " + inputStr + " has balanced parens"); } } }