Ejemplo n.º 1
0
        static void Main(string[] args)
        {
            Participant participant1 = new Participant();

            participant1.FirstName   = "Miodrag";
            participant1.LastName    = "Cekikj";
            participant1.DateOfBirth = new DateTime(1989, 5, 15);
            participant1.Role        = AcademyRole.Trainer;
            participant1.Greetings();

            var participant2 = new Participant();

            participant2.FirstName   = "Goce";
            participant2.LastName    = "Kabov";
            participant2.DateOfBirth = new DateTime(1992, 5, 15);
            participant2.Role        = AcademyRole.Assistant;
            participant2.Greetings();

            var participant3 = new Participant("Bob", "Marley");

            participant3.Role       = AcademyRole.Assistant;
            Console.ForegroundColor = ConsoleColor.Yellow;
            participant3.PrintFullName();

            var participant4 = new Participant()
            {
                FirstName = "Tupac",
                LastName  = "Shakur",
                Subjects  = new string[] { "C# Basic", "C# Advanced" }
            };

            participant4.PrintFullName();

            var participants = new Participant[4];

            participants[0] = participant1;
            participants[1] = participant2;
            participants[2] = participant3;
            participants[3] = participant4;

            AcademyHelper.FindParticipantByRole(participants, AcademyRole.Trainer);

            Console.ReadLine();
        }
Ejemplo n.º 2
0
        static void Main(string[] args)
        {
            Participant participant1 = new Participant();

            participant1.FirstName   = "Miodrag";
            participant1.LastName    = "Cekikj";
            participant1.DateOfBirth = new DateTime(1989, 5, 15);
            participant1.Role        = AcademyRole.Trainer;
            participant1.Greetings();

            var participant2 = new Participant();

            participant2.FirstName   = "Goce";
            participant2.LastName    = "Kabov";
            participant2.DateOfBirth = new DateTime(1992, 5, 15);
            participant2.Role        = AcademyRole.Assistant;
            participant2.Greetings();

            var participant3 = new Participant("Bob", "Marley");

            participant3.Role       = AcademyRole.Assistant;
            Console.ForegroundColor = ConsoleColor.Yellow;
            participant3.PrintFullName();

            var participant4 = new Participant()
            {
                FirstName = "Tupac",
                LastName  = "Shakur",
                Subjects  = new Subject[2]
            };

            //Added Subjects with Tools
            #region MyRegion
            var cSharBasic = new Subject();
            cSharBasic.Title    = "C# Basic";
            cSharBasic.Semester = 2;
            cSharBasic.Tools    = new Tooling()
            {
                MainIDE        = "VS 2019",
                AlternativeIDE = "VS Code"
            };

            var cSharpAdvanced = new Subject();
            cSharpAdvanced.Title    = "C# Advanced";
            cSharpAdvanced.Semester = 2;
            cSharpAdvanced.Tools    = new Tooling()
            {
                MainIDE        = "VS 2019",
                AlternativeIDE = "VS Code"
            };
            #endregion

            participant4.PrintFullName();

            var participants = new Participant[4];
            participants[0] = participant1;
            participants[1] = participant2;
            participants[2] = participant3;
            participants[3] = participant4;

            ParticipantHelper.FindParticipantByRole(participants, AcademyRole.Trainer);

            //Added more Participant with subjects and tools, from 1st semester
            #region MyRegion
            var introductionTrainer = new Participant()
            {
                FirstName = "Risto",
                LastName  = "Panchevski",
                Role      = AcademyRole.Trainer,
                Subjects  = new Subject[]
                {
                    new Subject()
                    {
                        Title    = "Introduction to Web Development",
                        Semester = 1
                    }
                }
            };

            var htmlCssTrainer = new Participant()
            {
                FirstName = "Jane",
                LastName  = "Dimeski",
                Role      = AcademyRole.Trainer,
                Subjects  = new Subject[]
                {
                    new Subject()
                    {
                        Title    = "HTML",
                        Semester = 1,
                        Tools    = new Tooling()
                        {
                            MainIDE = "Sublime Text 3"
                        }
                    },
                    new Subject()
                    {
                        Title    = "CSS",
                        Semester = 1,
                        Tools    = new Tooling()
                        {
                            MainIDE = "Sublime Text 3"
                        }
                    }
                }
            };

            var htmlCssAssistant = new Participant()
            {
                FirstName = "Vukashin",
                LastName  = "Obradovikj",
                Role      = AcademyRole.Assistant,
                Subjects  = new Subject[]
                {
                    new Subject()
                    {
                        Title    = "HTML",
                        Semester = 1,
                        Tools    = new Tooling()
                        {
                            MainIDE = "Sublime Text 3"
                        }
                    },
                    new Subject()
                    {
                        Title    = "CSS",
                        Semester = 1,
                        Tools    = new Tooling()
                        {
                            MainIDE = "Sublime Text 3"
                        }
                    }
                }
            };

            var jsBasicCotrainer = new Participant()
            {
                FirstName = "Trajan",
                LastName  = "Stevkovski",
                Role      = AcademyRole.Cotrainer,
                Subjects  = new Subject[]
                {
                    new Subject()
                    {
                        Title    = "Java Script Basic",
                        Semester = 1,
                        Tools    = new Tooling()
                        {
                            MainIDE        = "VS Code",
                            AlternativeIDE = "VS 2019"
                        }
                    }
                }
            };

            var jsCotrainer = new Participant()
            {
                FirstName = "Ivo",
                LastName  = "Kostovski",
                Role      = AcademyRole.Cotrainer,
                Subjects  = new Subject[]
                {
                    new Subject()
                    {
                        Title    = "Java Script Basic",
                        Semester = 1,
                        Tools    = new Tooling()
                        {
                            MainIDE        = "VS Code",
                            AlternativeIDE = "VS 2019"
                        }
                    },
                    new Subject()
                    {
                        Title    = "Java Script Advanced",
                        Semester = 1,
                        Tools    = new Tooling()
                        {
                            MainIDE        = "VS Code",
                            AlternativeIDE = "VS 2019"
                        }
                    }
                }
            };

            var jsAdvancedCotrainer = new Participant()
            {
                FirstName = "Aleksandar",
                LastName  = "Kocevski",
                Role      = AcademyRole.Cotrainer,
                Subjects  = new Subject[]
                {
                    new Subject()
                    {
                        Title    = "Java Script Advanced",
                        Semester = 1,
                        Tools    = new Tooling()
                        {
                            MainIDE        = "VS Code",
                            AlternativeIDE = "VS 2019"
                        }
                    }
                }
            };

            var firstSemesterTrainers = new Participant[6];
            firstSemesterTrainers[0] = introductionTrainer;
            firstSemesterTrainers[1] = htmlCssTrainer;
            firstSemesterTrainers[2] = htmlCssAssistant;
            firstSemesterTrainers[3] = jsBasicCotrainer;
            firstSemesterTrainers[4] = jsCotrainer;
            firstSemesterTrainers[5] = jsAdvancedCotrainer;

            ParticipantHelper.PrintTrainersAndAssistantsFrom1stSemester(firstSemesterTrainers);
            #endregion

            Console.ReadLine();
        }
Ejemplo n.º 3
0
        static void Main(string[] args)
        {
            //var assistant = new Assistant();
            //var student = new Student();

            Trainer trainer = new Trainer("Miodrag", "Cekikj");

            trainer.DateOfBirth = new DateTime(1989, 5, 15);
            //trainer.Role = AcademyRole.Trainer;

            int[] numbers = new int[] { 1, 2, 3 };
            trainer.Subjects = new Subject[]
            {
                new Subject()
                {
                    Title    = "C# Basic",
                    Semester = 2,
                    Tools    = new Tooling()
                    {
                        MainIDE        = "Visual Studio 2019",
                        AlternativeIDE = "Visual Studio Code"
                    }
                },
                new Subject()
                {
                    Title    = "C# Advanced",
                    Semester = 2,
                    Tools    = new Tooling()
                    {
                        MainIDE        = "Visual Studio 2019",
                        AlternativeIDE = "Visual Studio Code"
                    }
                }
            };

            trainer.Greetings();

            var assistant = new Assistant();

            assistant.FirstName   = "Goce";
            assistant.LastName    = "Kabov";
            assistant.DateOfBirth = new DateTime(1992, 5, 15);
            assistant.Role        = AcademyRole.Assistant;
            assistant.Greetings();

            var student1 = new Participant("Bob", "Marley");

            student1.Role           = AcademyRole.Assistant;
            Console.ForegroundColor = ConsoleColor.Yellow;
            student1.PrintFullName();

            var student2 = new Participant()
            {
                FirstName = "Tupac",
                LastName  = "Shakur"
            };

            var cSharpBasic = new Subject();

            cSharpBasic.Title    = "C# Basic";
            cSharpBasic.Semester = 2;

            var cSharpAdvanced = new Subject();

            cSharpAdvanced.Title    = "C# Advanced";
            cSharpAdvanced.Semester = 2;

            //participant4.Subjects = new string[] {"C# Basic", "C# Advanced"};

            student2.Subjects = new Subject[] { cSharpBasic, cSharpAdvanced };

            foreach (var subject in student2.Subjects)
            {
                Console.WriteLine(subject.Title);
            }

            student2.PrintFullName();

            var participants = new Participant[4];

            participants[0] = trainer;
            participants[1] = assistant;
            participants[2] = student1;
            participants[3] = student2;

            ParticipantHelper.FindParticipantByRole(participants, AcademyRole.Trainer);

            Console.ReadLine();
        }
Ejemplo n.º 4
0
        static void Main(string[] args)
        {
            Participant participant1 = new Participant();

            participant1.FirstName   = "Miodrag";
            participant1.LastName    = "Cekikj";
            participant1.DateOfBirth = new DateTime(1989, 5, 15);
            participant1.Role        = AcademyRole.Trainer;

            participant1.Subjects = new Subject[]
            {
                new Subject()
                {
                    Title    = "C# Basic",
                    Semester = 2,
                    Tools    = new Tooling()
                    {
                        MainIDE        = "Visual Studio",
                        AlternativeIDE = "Visual Studio Code"
                    }
                },
                new Subject()
                {
                    Title    = "C# Advanced",
                    Semester = 2,
                    Tools    = new Tooling()
                    {
                        MainIDE        = "Visual Studio",
                        AlternativeIDE = "Visual Studio Code"
                    }
                }
            };

            participant1.Greetings();

            var participant2 = new Participant();

            participant2.FirstName   = "Goce";
            participant2.LastName    = "Kabov";
            participant2.DateOfBirth = new DateTime(1992, 5, 15);
            participant2.Role        = AcademyRole.Assistant;
            participant2.Greetings();

            var participant3 = new Participant("Bob", "Marley");

            participant3.Role       = AcademyRole.Assistant;
            Console.ForegroundColor = ConsoleColor.Yellow;
            participant3.PrintFullName();

            var participant4 = new Participant()
            {
                FirstName = "Tupac",
                LastName  = "Shakur"
            };

            var cSharpBasic = new Subject();

            cSharpBasic.Title    = "C# Basic";
            cSharpBasic.Semester = 2;

            var cSharpAdvanced = new Subject();

            cSharpAdvanced.Title    = "C# Advanced";
            cSharpAdvanced.Semester = 2;

            //participant4.Subjects = new string[] {"C# Basic", "C# Advanced"};

            participant4.Subjects = new Subject[] { cSharpBasic, cSharpAdvanced };

            foreach (var subject in participant4.Subjects)
            {
                Console.WriteLine(subject.Title);
            }

            participant4.PrintFullName();

            var participants = new Participant[4];

            participants[0] = participant1;
            participants[1] = participant2;
            participants[2] = participant3;
            participants[3] = participant4;

            ParticipantHelper.FindParticipantByRole(participants, AcademyRole.Trainer);

            Console.ReadLine();
        }
        static void Main(string[] args)
        {
            Participant participant1 = new Participant();

            participant1.FirstName   = "Miodrag";
            participant1.LastName    = "Cekikj";
            participant1.DateOfBirth = new DateTime(1989, 5, 15);
            participant1.Role        = AcademyRole.Trainer;

            participant1.Subjects = new Subject[]
            {
                new Subject()
                {
                    Title    = "C# Basic",
                    Semester = 2,
                    Tools    = new Tooling()
                    {
                        MainIDE        = "Visual Studio",
                        AlternativeIDE = "Visual Studio Code"
                    }
                },
                new Subject()
                {
                    Title    = "C# Advanced",
                    Semester = 2,
                    Tools    = new Tooling()
                    {
                        MainIDE        = "Visual Studio",
                        AlternativeIDE = "Visual Studio Code"
                    }
                }
            };

            participant1.Greetings();

            var participant2 = new Participant();

            participant2.FirstName   = "Goce";
            participant2.LastName    = "Kabov";
            participant2.DateOfBirth = new DateTime(1992, 5, 15);
            participant2.Role        = AcademyRole.Assistant;
            participant2.Greetings();

            participant2.Subjects = new Subject[]
            {
                new Subject()
                {
                    Title    = "HTML",
                    Semester = 1,
                    Tools    = new Tooling()
                    {
                        MainIDE        = "Sublime",
                        AlternativeIDE = "N/A",
                    }
                },
                new Subject()
                {
                    Title    = "CSS",
                    Semester = 1,
                    Tools    = new Tooling()
                    {
                        MainIDE        = "Sublime",
                        AlternativeIDE = "N/A",
                    }
                }
            };

            var participant3 = new Participant("Bob", "Marley");

            participant3.Role       = AcademyRole.Assistant;
            Console.ForegroundColor = ConsoleColor.Yellow;
            participant3.PrintFullName();

            participant3.Subjects = new Subject[]
            {
                new Subject
                {
                    Title    = ".NET",
                    Semester = 3,
                    Tools    = new Tooling()
                    {
                        MainIDE        = "Visual Studio",
                        AlternativeIDE = "Visual Studio Code",
                    }
                },
                new Subject
                {
                    Title    = ".NET - Advanced ",
                    Semester = 3,
                    Tools    = new Tooling()
                    {
                        MainIDE        = "Visual Studio",
                        AlternativeIDE = "Visual Studio Code",
                    }
                },
            };

            var participant4 = new Participant()
            {
                FirstName = "Dimitar",
                LastName  = "Risteski",
                Role      = AcademyRole.Student,
            };

            participant4.Subjects = new Subject[]
            {
                new Subject
                {
                    Title    = "Java Script Basic",
                    Semester = 1,
                    Tools    = new Tooling()
                    {
                        MainIDE        = "Visual Studio Code",
                        AlternativeIDE = "Sublime",
                    }
                },
                new Subject
                {
                    Title    = "Java Script Advanced",
                    Semester = 1,
                    Tools    = new Tooling()
                    {
                        MainIDE        = "Visual Studio Code",
                        AlternativeIDE = "Sublime",
                    }
                },
            };
            Console.BackgroundColor = ConsoleColor.Yellow;
            Console.ForegroundColor = ConsoleColor.DarkBlue;
            Console.WriteLine($"Check: Name {participant4.FirstName} Role:{participant4.Role} " +
                              $"\nTitle: {participant4.Subjects[1].Title} code: {participant4.Subjects[1].Tools.Code} \n" +
                              $"MainIDE {participant4.Subjects[1].Tools.MainIDE}");

            Console.ResetColor();

            foreach (var subject in participant4.Subjects)
            {
                Console.WriteLine(subject.Title);
            }

            participant4.PrintFullName();

            var participants = new Participant[4];

            participants[0] = participant1;
            participants[1] = participant2;
            participants[2] = participant3;
            participants[3] = participant4;

            ParticipantHelper.FindParticipantByRole(participants, AcademyRole.Trainer);

            Console.ReadLine();
        }
Ejemplo n.º 6
0
        static void Main(string[] args)
        {
            var participant1 = new Participant();

            participant1.FirstName   = "Miodrag";
            participant1.LastName    = "Cekikj";
            participant1.DateOfBirth = new DateTime(1989, 5, 15);
            participant1.Role        = AcademyRole.Trainer;

            // List of Subjects instead of array----Also in class Participant initiated public List Subject
            participant1.Subjects = new List <Subject>()
            {
                new Subject()
                {
                    Title    = "C# Basic",
                    Semester = 2,
                    Tools    = new Tooling()
                    {
                        MainIDE        = "Visual Studio",
                        AlternativeIDE = "Visual Studio Code"
                    }
                },
                new Subject()
                {
                    Title    = "C# Advanced",
                    Semester = 2,
                    Tools    = new Tooling()
                    {
                        MainIDE        = "Visual Studio",
                        AlternativeIDE = "Visual Studio Code"
                    }
                }
            };

            participant1.Greetings();

            Console.WriteLine("-----------------------------------------------");
            var participant2 = new Participant();

            participant2.FirstName   = "Goce";
            participant2.LastName    = "Kabov";
            participant2.DateOfBirth = new DateTime(1992, 5, 15);
            participant2.Role        = AcademyRole.Assistant;
            participant2.Greetings();

            Console.WriteLine("-----------------------------------------------");
            var participant3 = new Participant("Bob", "Marley");

            participant3.Role       = AcademyRole.Assistant;
            Console.ForegroundColor = ConsoleColor.DarkYellow;
            participant3.PrintFullName();


            Console.WriteLine("-----------------------------------------------");
            Console.ForegroundColor = ConsoleColor.Yellow;
            var participant4 = new Participant()
            {
                FirstName = "Tupac",
                LastName  = "Shakur"
            };

            var cSharpBasic = new Subject();

            cSharpBasic.Title    = "C# Basic";
            cSharpBasic.Semester = 2;

            var cSharpAdvanced = new Subject();

            cSharpAdvanced.Title    = "C# Advanced";
            cSharpAdvanced.Semester = 2;

            //List of Subject for participant4

            participant4.Subjects = new List <Subject>();
            participant4.Subjects.Add(cSharpBasic);
            participant4.Subjects.Add(cSharpAdvanced);

            foreach (var subject in participant4.Subjects)
            {
                Console.WriteLine(subject.Title);
            }

            participant4.PrintFullName();

            Console.WriteLine("-----------------------------------------------");

            // List of Participants and setting a specific Index
            List <Participant> participants = new List <Participant>();

            participants.Insert(0, participant1);
            participants.Insert(1, participant2);
            participants.Insert(2, participant3);
            participants.Insert(3, participant4);

            // Corection of the first parameter and appropriatelly in to ParticipantHelper method in Helpers Folder
            ParticipantHelper.FindParticipantByRole(participants, AcademyRole.Trainer);

            Console.ReadLine();
        }