/// <summary>
        /// 获取指定学生的GPA信息,所有
        /// </summary>
        /// <param name="StuID">学号</param>
        /// <returns>返回计算后的GPA</returns>
        public static GPAInfo AllCredit(List <Score> Slist)
        {
            //List<Score> Slist = jwOp.GetScores(StuID);
            GPAInfo Stu = Compute(Slist);

            return(Stu);
        }
        /// <summary>
        /// 给定成绩列表算出GPA
        /// </summary>
        /// <param name="Slist">成绩列表</param>
        /// <returns>返回计算后的GPA</returns>
        public static GPAInfo Compute(List <Score> Slist)
        {
            if (Slist == null)
            {
                return(new GPAInfo(0, 0, 0));
            }
            float CreditAll = 0; //Credit--SUM
            float ScoreAll  = 0; //Score*Credit--SUM
            float GPAAll    = 0; //GPA*Credit --SUM

            foreach (Score s in Slist)
            {
                CreditAll += float.Parse(s.Credit);
                GPAAll    += ComputeGPA(float.Parse(s.Mark)) * float.Parse(s.Credit);
                ScoreAll  += float.Parse(s.Credit) * float.Parse(s.Mark);
            }

            float   GPA          = GPAAll / CreditAll;
            float   AverageScore = ScoreAll / CreditAll;
            GPAInfo Stu1         = new GPAInfo(GPA, AverageScore, CreditAll);

            return(Stu1);
        }
        /// <summary>
        /// 给定成绩列表算出GPA,为UI计算的时候使用
        /// </summary>
        /// <param name="Slist">成绩列表</param>
        /// <returns>返回计算后的GPA</returns>
        public static GPAInfo ComputeUI(List <miniScore> Slist)
        {
            if (Slist == null)
            {
                return(new GPAInfo(0, 0, 0));
            }
            float CreditAll = 0; //Credit--SUM
            float ScoreAll  = 0; //Score*Credit--SUM
            float GPAAll    = 0; //GPA*Credit --SUM

            foreach (miniScore s in Slist)
            {
                CreditAll += s.Credit;
                GPAAll    += ComputeGPA(s.Score) * s.Credit;
                ScoreAll  += s.Credit * s.Score;
            }

            float   GPA          = GPAAll / CreditAll;
            float   AverageScore = ScoreAll / CreditAll;
            GPAInfo Stu1         = new GPAInfo(GPA, AverageScore, CreditAll);

            return(Stu1);
        }