示例#1
0
 public Degree(PassFailCourse pfCourseA, PassFailCourse pfCourseB, GradedCourse gCourseA, GradedCourse gCourseB)
 {
     this.PFCourseA = pfCourseA;
     this.PFCourseB = pfCourseB;
     this.GCourseA  = gCourseA;
     this.GCourseB  = gCourseB;
 }
示例#2
0
        static void Main(string[] args)
        {
            PassFailCourse pfCourseA = new PassFailCourse("pfCourseA", true);
            PassFailCourse pfCourseB = new PassFailCourse("pfCourseB", false);
            GradedCourse   gCourseA  = new GradedCourse("gCourseA", 90);
            GradedCourse   gCourseB  = new GradedCourse("gCourseB", 65);
            Degree         myDegree  = new Degree(pfCourseA, pfCourseB, gCourseA, gCourseB);

            if (myDegree.Passed())
            {
                Console.WriteLine("The degree is fulfilled");
            }
            else
            {
                Console.WriteLine("The degree has not been fulfilled");
            }
            Console.ReadKey();
        }