Likewise, your calcAvg function will loop over the students and call the calculateAverage member function for each of them (or you can change it such that operator>> will call calculateAverage), and then your printData function will loop over the students and use the operator<< to print each of them.