Ejemplo n.º 1
0
        static void Main(string[] args)
        {
            /*
             * Teacher[] teacher = new Teacher[]
             * {
             *  new Teacher("William", "Hanna", "7/14/1910", "3400 Cahuenga Blvd. West", "", "Hollywood", "CA", "90028", "USA"),
             *  new Teacher("Joseph", "Barbera", "3/24/1911", "3400 Cahuenga Blvd. West", "", "Hollywood", "CA", "90028", "USA")
             * };
             *
             *
             *
             * Course course = new Course("Programming with C#", student, teacher);
             * Degree degree = new Degree("Bachelor", course);
             * UProgram program = new UProgram("Information Technology", degree);
             *
             * Console.WriteLine("The {0} program contains the {1} degree\n", program.ProgramTitle, program.Degree.DegreeTitle);
             * Console.WriteLine("The {0} degree contains the course {1}\n", degree.DegreeTitle, degree.Course.CourseTitle);
             * Console.WriteLine("The {0} course contains {1} student(s)", degree.Course.CourseTitle, Student.StudentCount);
             *
             * Console.WriteLine("\nInstructors such as {0} may perform the following...", degree.Course.Teacher[0].FullName);
             * Teacher.GradeTest();
             *
             * Console.WriteLine("\nStudents such as {0} may perform the following...", degree.Course.Student[0].FullName);
             * Student.TakeTest();
             */


            Student student1 = new Student("Fred", "Flintstone", "9/30/1960", "301 Cobblestone Way", "", "Bedrock", "LA", "70777", "USA");
            Student student2 = new Student("Barney", "Rubble", "9/30/1960", "301 Cobblestone Way", "", "Bedrock", "LA", "70777", "USA");
            Student student3 = new Student("Wilma", "Flintstone", "9/30/1960", "301 Cobblestone Way", "", "Bedrock", "LA", "70777", "USA");

            student1.Grades.Push(75);
            student1.Grades.Push(80);
            student1.Grades.Push(99);
            student1.Grades.Push(100);
            student1.Grades.Push(98);

            student2.Grades.Push(77);
            student2.Grades.Push(78);
            student2.Grades.Push(79);
            student2.Grades.Push(80);
            student2.Grades.Push(81);

            student3.Grades.Push(90);
            student3.Grades.Push(85);
            student3.Grades.Push(80);
            student3.Grades.Push(75);
            student3.Grades.Push(70);

            Course course = new Course("Programming with C#");

            course.Student.Add(student1);
            course.Student.Add(student2);
            course.Student.Add(student3);

            course.ListStudents();

            Console.WriteLine("Press any key to continue . . .");
            Console.ReadKey();
        }
Ejemplo n.º 2
0
        static void Main(string[] args)
        {
            Student stu1 = new Student("Firstname1", "lastname1", "01-01-0001", "adress1", "adress21", "city1", "state1", 1, "country1");
            Student stu2 = new Student("Firstname2", "lastname2", "02-02-0002", "adress2", "adress22", "city2", "state2", 2, "country2");
            Student stu3 = new Student("Firstname3", "lastname3", "03-03-0003", "adress3", "adress23", "city3", "state3", 3, "country3");

            //adding grades

            for (int i = 0; i < 5; i++)
            {
                stu1.Grades.Push((i * 4));
            }
            for (int i = 0; i < 5; i++)
            {
                stu2.Grades.Push((i * 4));
            }
            for (int i = 0; i < 5; i++)
            {
                stu3.Grades.Push((i * 4));
            }

            //adding students to the course arraylist

            Course csharp = new Course("Programming with C#", 4, 6);

            csharp.Students.Add(stu1);
            csharp.Students.Add(stu2);
            csharp.Students.Add(stu3);

            //Displaying student names

            csharp.ListStudents();


            //Teacher teach = new Teacher("Teacher1", "Teacherlastname", "01-01-0001", "teachadress", "teachadress2", "teachcity", "teachstate", 55, "teacountry");

            //csharp.addTeacher(teach);

            //Degree bachelor = new Degree("Bachelor", 8);

            //bachelor.Course = csharp;

            //UProgram IT = new UProgram("Information Technology", "dptHead");
            //IT.Degree = bachelor;


            //// Displaying infos

            //Console.WriteLine("Program : {0}, Degree : {1}", IT.Name, IT.Degree.Name);
            //Console.WriteLine("Course in the degree : {0}", bachelor.Course.CourseName);
            //Console.WriteLine("Number of students in course : {0}", Student.StudentsCount);


            ////Challenge

            //Person person = new Person("name", "lastname", "01-01-0001", " ", ".", ".", ".", 14654, ".");
        }
Ejemplo n.º 3
0
        static void Main(string[] args)
        {
            /*
            Teacher[] teacher = new Teacher[]
            {
                new Teacher("William", "Hanna", "7/14/1910", "3400 Cahuenga Blvd. West", "", "Hollywood", "CA", "90028", "USA"),
                new Teacher("Joseph", "Barbera", "3/24/1911", "3400 Cahuenga Blvd. West", "", "Hollywood", "CA", "90028", "USA")
            };

            Course course = new Course("Programming with C#", student, teacher);
            Degree degree = new Degree("Bachelor", course);
            UProgram program = new UProgram("Information Technology", degree);

            Console.WriteLine("The {0} program contains the {1} degree\n", program.ProgramTitle, program.Degree.DegreeTitle);
            Console.WriteLine("The {0} degree contains the course {1}\n", degree.DegreeTitle, degree.Course.CourseTitle);
            Console.WriteLine("The {0} course contains {1} student(s)", degree.Course.CourseTitle, Student.StudentCount);

            Console.WriteLine("\nInstructors such as {0} may perform the following...", degree.Course.Teacher[0].FullName);
            Teacher.GradeTest();

            Console.WriteLine("\nStudents such as {0} may perform the following...", degree.Course.Student[0].FullName);
            Student.TakeTest();
            */

            Student student1 = new Student("Fred", "Flintstone", "9/30/1960", "301 Cobblestone Way", "", "Bedrock", "LA", "70777", "USA");
            Student student2 = new Student("Barney", "Rubble", "9/30/1960", "301 Cobblestone Way", "", "Bedrock", "LA", "70777", "USA");
            Student student3 = new Student("Wilma", "Flintstone", "9/30/1960", "301 Cobblestone Way", "", "Bedrock", "LA", "70777", "USA");

            student1.Grades.Push(75);
            student1.Grades.Push(80);
            student1.Grades.Push(99);
            student1.Grades.Push(100);
            student1.Grades.Push(98);

            student2.Grades.Push(77);
            student2.Grades.Push(78);
            student2.Grades.Push(79);
            student2.Grades.Push(80);
            student2.Grades.Push(81);

            student3.Grades.Push(90);
            student3.Grades.Push(85);
            student3.Grades.Push(80);
            student3.Grades.Push(75);
            student3.Grades.Push(70);

            Course course = new Course("Programming with C#");
            course.Student.Add(student1);
            course.Student.Add(student2);
            course.Student.Add(student3);

            course.ListStudents();

            Console.WriteLine("Press any key to continue . . .");
            Console.ReadKey();
        }