Ejemplo n.º 1
0
        static void Main(string[] args)
        {
            var people = new List <Person>();

            var mark = new Person("Mark", 46, "male");

            people.Add(mark);
            var jane = new Person();

            people.Add(jane);
            var john = new Student("John Doe", 20, "male", "BME");

            people.Add(john);
            var student = new Student();

            people.Add(student);
            var gandhi = new Mentor("Gandhi", 148, "male", "senior");

            people.Add(gandhi);
            var mentor = new Mentor();

            people.Add(mentor);
            var sponsor = new Sponsor();

            people.Add(sponsor);
            var elon = new Sponsor("Elon Musk", 46, "male", "SpaceX");

            people.Add(elon);

            student.SkipDays(3);

            for (int i = 0; i < 5; i++)
            {
                elon.Hire();
            }
            for (int i = 0; i < 3; i++)
            {
                sponsor.Hire();
            }

            foreach (var person in people)
            {
                person.Introduce();
                person.GetGoal();
            }

            Cohort ocelot = new Cohort("OCELOT");

            ocelot.AddStudent(student);
            ocelot.AddStudent(john);
            ocelot.AddMentor(mentor);
            ocelot.AddMentor(gandhi);
            ocelot.Info();
            Console.WriteLine(mark.Introduce());
            Console.WriteLine(ocelot.Info());
            Console.ReadLine();
        }
Ejemplo n.º 2
0
        static void Main(string[] args)
        {
            Student jane = new Student("Jane Doe", 30, "female", "The school of life");

            Console.WriteLine(jane.Introduce());
            Student anna  = new Student("Bence", 25, "male", "The school of life");
            Student nori  = new Student("Nori", 28, "female", "Working hard");
            Student kinga = new Student("Kinga", 24, "female", "Working in London");

            kinga.SkipDays(12);
            Console.WriteLine(kinga.Introduce());
            Console.WriteLine(nori.GetGoal());
            Mentor janeMentor = new Mentor();
            Mentor mark       = new Mentor();
            Mentor levi       = new Mentor();
            Mentor laci       = new Mentor();

            Console.WriteLine(janeMentor.Introduce());
            Console.WriteLine(laci.GetGoal());
            Sponsor janeSponsor = new Sponsor();

            Console.WriteLine(janeSponsor.Introduce());
            Console.WriteLine(janeSponsor.Hire());
            Sponsor bestByte = new Sponsor();
            Sponsor prezi    = new Sponsor();

            Console.WriteLine(prezi.Hire());
            Cohort bestCohort = new Cohort("fulvipes");

            bestCohort.AddMentor(mark);
            bestCohort.AddMentor(levi);
            bestCohort.AddMentor(laci);
            bestCohort.AddMentor(janeMentor);

            bestCohort.AddStudent(jane);
            bestCohort.AddStudent(anna);
            bestCohort.AddStudent(nori);
            bestCohort.AddStudent(kinga);

            Console.WriteLine(bestCohort.Info());
            Console.ReadLine();
        }
Ejemplo n.º 3
0
        static void Main(string[] args)
        {
            Cohort fulvipes = new Cohort("FulVipes");

            fulvipes.AddMentor(new Mentor());
            fulvipes.AddMentor(new Mentor());
            fulvipes.AddMentor(new Mentor());

            fulvipes.AddStudent(new Student());
            fulvipes.AddStudent(new Student());
            fulvipes.AddStudent(new Student());
            fulvipes.AddStudent(new Student());
            fulvipes.AddStudent(new Student());
            fulvipes.AddStudent(new Student());
            fulvipes.AddStudent(new Student());

            Console.WriteLine(fulvipes.Info());

            Console.ReadLine();
        }