private void PrintStudents(Dictionary <string, double> studentsSorted) { foreach (KeyValuePair <string, double> keyValuePair in studentsSorted) { OutputWriter.PrintStudent(keyValuePair); } }
public static void GetStudentScoresFromCourse(string courseName, string userName) { if (IsQuerryForStudentsPossible(courseName, userName)) { OutputWriter.PrintStudent(new KeyValuePair <string, List <int> >(userName, studentsByCourse[courseName][userName])); } }
private static void PrintStudents(Dictionary <string, List <int> > studentsSorted) { foreach (KeyValuePair <string, List <int> > keyValuePair in studentsSorted) { OutputWriter.PrintStudent(keyValuePair); } }
private void PrintStudents(Dictionary <string, double> dataSorted) { foreach (var student in dataSorted) { OutputWriter.PrintStudent(student); } }
public void GetStudentScoresFromCourse(string courseName, string userName) { if (IsQuerryForStudentPossible(courseName, userName)) { OutputWriter.PrintStudent(new KeyValuePair <string, double>(userName, courses[courseName].StudentsByName[userName].MarksByCourseName[courseName])); } }
public static void GetAllStudentsFromCourse(string courseName) { if (IsQuerryForCoursePossible(courseName)) { OutputWriter.WriteMessageOnNewLine($"{courseName}"); foreach (var studentsMarksEntry in studentsByCourse[courseName]) { OutputWriter.PrintStudent(studentsMarksEntry); } } }
private void FilterAndTake(Dictionary <string, double> studentsWithMarks, Predicate <double> givenFilter, int studentsToTake) { int counterForPrinted = 0; foreach (var studentMark in studentsWithMarks) { if (counterForPrinted == studentsToTake) { break; } if (givenFilter(studentMark.Value)) { OutputWriter.PrintStudent(new KeyValuePair <string, double>(studentMark.Key, studentMark.Value)); counterForPrinted++; } } }
private static void FilterAndTake(Dictionary <string, List <int> > wantedData, Predicate <double> givenFilter, int studentsToTake) { int counterForPrinted = 0; foreach (var userName_Points in wantedData) { if (counterForPrinted == studentsToTake) { break; } //double averageMark = Average(userName_Points.Value); double averageScore = userName_Points.Value.Average(); double percentageOfFullfillment = averageScore / 100; double mark = percentageOfFullfillment * 4 + 2; if (givenFilter(mark)) { OutputWriter.PrintStudent(userName_Points); counterForPrinted++; } } }