Instructors may see Buddy usage statistics per group (course section), but a statistic for a small group can reveal individuals. Implement a report with a minimum group size.
Input: first line minSize. Then lines section studentPseudonym questions (weekly number of Buddy questions of one student), until the end of input. A student appears at most once per section.
For each section, in order of first appearance, print either
section: students n, total t, average a.a, max m
or, if the section has fewer than minSize students,
section: hidden (fewer than minSize students)
Then print an overall line for all students: ALL: students n, total t, average a.a — but also apply a complementary-disclosure check: if exactly one section is hidden and the overall line is shown, a reader could subtract the visible sections from the total to recover the hidden section. In that case print ALL: hidden (would reveal a small section) instead. (If the overall number of students is below minSize, print ALL: hidden (fewer than minSize students).)
Input:
5
W01 s1 3
W01 s2 5
W01 s3 0
W01 s4 2
W01 s5 10
W02 s6 7
W02 s7 1
Output:
W01: students 5, total 20, average 4.0, max 10
W02: hidden (fewer than 5 students)
ALL: hidden (would reveal a small section)