Example #1
0
        private static void displayAverages()
        {
            Console.WriteLine("Averages:");
            if (averages == null)
            {
                averages = client.GetSubjectAverages();
            }
            Dictionary <string, Subject> sd = client.GetSubjectsIDDictionary();

            for (int i = 0; i < averages.Count; i++)
            {
                string name          = sd[averages[i].SubjectID].Name;
                string id            = averages[i].SubjectID;
                string firstSemester = averages[i].FirstSemester;
                string secondSemeter = averages[i].SecondSemester;
                string final         = averages[i].FullYear;
                Console.WriteLine($"Subject: {name} (id: {id})");
                Console.WriteLine($"Fist semester: {firstSemester}");
                Console.WriteLine($"Second semester: {secondSemeter}");
                Console.WriteLine($"Final: {final}" + Environment.NewLine);
            }
        }