Both file statistics and line statistics provide the same values like totals and averages. Let it be a simpler statistics accumulator class that calculates min, max, total (sum), arithmetic average (and may be the mean value). Then use two objects of this class for files (line count) and lines (character count).
Both file statistics and line statistics provide the same values like totals and averages. Let it be a simpler statistics accumulator class that calculates min, max, total (sum), arithmetic average (and may be the mean value). Then use two objects of this class for files (line count) and lines (character count).