@Override protected void doFinalStuff() throws IOException { int numOfWords = WordsTool.getInstance().getIntegerMap().get(currFileName); double avgWordLength = (double) wordLengthSum / numOfWords; getDoubleMap().put(currFileName, Utils.getDouble(avgWordLength)); super.doFinalStuff(); }
/** Create Maps for file and reset data members */ @Override protected void initForFile() { super.initForFile(); wordLengthSum = 0; }