using System.Collections.Generic;
public class StudentRecord : IComparable<StudentRecord>
public Dictionary<string, string> coursehistory = new Dictionary<string, string>();
public StudentRecord(string pname)
private string coursename;
foreach (KeyValuePair<string, string> pair in coursehistory)
totalscore = totalscore + 4;
else if (pair.Value == "B")
totalscore = totalscore + 3.3;
else if (pair.Value == "C")
totalscore = totalscore + 2.7;
totalscore = totalscore + 0;
return totalscore / count;
public int CompareTo(StudentRecord b)
public static void Main()