public static void generateCohort(studentStat[] studentArray, cohortStat group) { for (int i = 1; i < studentArray.Length; i++) { group.addStudent(studentArray[i]); } }
private static void printCohort(cohortStat group) { Console.WriteLine("Total Current Student Loans Matriculating: " + group.currentMatriculation()); Console.WriteLine("Current Largest Loan: " + group.currentLargest()); Console.WriteLine("Current Smallest Loan: " + group.currentSmallest()); Console.WriteLine("Current Number of Loans Paid Off: " + group.currentPaidOff()); }
static void Main(string[] args) { const int numStudents = 5; studentStat[] studentArray = new studentStat[numStudents]; generateStudents(studentArray); printStudentInfo(studentArray); studentStat initialStudent = studentArray[0]; cohortStat group = new cohortStat(initialStudent); generateCohort(studentArray, group); printCohort(group); }