Beispiel #1
0
 public Degree(PassFailCourse pfcoursea, PassFailCourse pfcourseb, GradedCourse gradedcoursea, GradedCourse gradedcourseb)
 {
     this.PFCourseA     = pfcoursea;
     this.PFCourseB     = pfcourseb;
     this.GradedCourseA = gradedcoursea;
     this.GradedCourseB = gradedcourseb;
 }
Beispiel #2
0
        static void Main(string[] args)
        {
            PassFailCourse PFCourseB = new PassFailCourse("CS100", true);
            PassFailCourse PFCourseA = new PassFailCourse("CS200", false);
            GradedCourse   GCourseA  = new GradedCourse("CIS100", 86.51M);
            GradedCourse   GCourseB  = new GradedCourse("CIS200", 69.35M);

            Degree SE = new Degree(PFCourseA, PFCourseB, GCourseA, GCourseB);

            if (SE.Passed() == true)
            {
                Console.WriteLine("Congratulations!");
                Console.Read();
            }
            else
            {
                Console.WriteLine("Would you like fries with that?");
                Console.Read();
            }
        }