Ejemplo n.º 1
0
            public void Passed()
            {
                bool[] array  = { Course1.Passed(), Course2.Passed(), Course3.Passed(), Course4.Passed() };
                var    course = 0;

                foreach (var item in array)
                {
                    if (item == true)
                    {
                        course++;
                    }
                }
                if (course > 2)
                {
                    Console.WriteLine("The student has passed.");
                }
                else
                {
                    Console.WriteLine("The student has failed.");
                }
            }
Ejemplo n.º 2
0
        static void Main(string[] args)
        {
            var firstCourseOne  = new FirstCourse("C#", true);
            var firstCourseTwo  = new FirstCourse("JS", false);
            var secondCourseOne = new SecondCourse("HTML", studentGrade.Bad);
            var secondCourseTwo = new SecondCourse("CSS", studentGrade.Excellent);
            var newProject      = new Project()
            {
                first1  = firstCourseOne,
                first2  = firstCourseTwo,
                second1 = secondCourseOne,
                second2 = secondCourseTwo
            };

            newProject.Passed(
                firstCourseOne.Passed(firstCourseOne.Registration),
                firstCourseTwo.Passed(firstCourseTwo.Registration),
                secondCourseOne.Passed(secondCourseOne.Grade),
                secondCourseTwo.Passed(secondCourseTwo.Grade)
                );

            Console.ReadLine();
        }
Ejemplo n.º 3
0
        static void Main(string[] args)
        {
            //PhotoAlbum myAlbum1 = new PhotoAlbum();
            //myAlbum1.GetNumberOfPages();

            //PhotoAlbum myAlbum2 = new PhotoAlbum(24);
            //myAlbum2.GetNumberOfPages();

            //BigPhotoAlbum myAlbum3 = new BigPhotoAlbum();
            //myAlbum3.GetNumberOfPages();

            // TASK 02........................................................................

            var firstCourseOne = new FirstCourse("SEDC", true);
            var firstCourseTwo = new FirstCourse("SEDC", true);

            var secondCourseOne = new SecondCourse("SEDC", StudentGrades.Seven);
            var SecondCourseTwo = new SecondCourse("SEDC", StudentGrades.Six);

            Project Grades = new Project(firstCourseOne.Passed(), firstCourseTwo.Passed(), secondCourseOne.Passed(), SecondCourseTwo.Passed());

            Grades.Passed();

            Console.ReadLine();
        }