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 awesome = new Cohort("AWESOME"); awesome.AddStudent(student); awesome.AddStudent(john); awesome.AddMentor(mentor); awesome.AddMentor(gandhi); awesome.Info(); Console.ReadLine(); }
static void Main(string[] args) { Student Nori = new Student(); Student Kinga = new Student("Kinga", 25, "female", "London"); Student Bence = new Student("Bence", 25, "male", "Spain"); Student Lili = new Student("Lili", 23, "female", "ELTE"); Kinga.SkipDays(5); Bence.SkipDays(1); Console.WriteLine(Kinga.Introduce()); Console.WriteLine("Lili's goal is: " + Lili.GetGoal()); Console.WriteLine(Bence.Introduce()); Mentor Levi = new Mentor("Levi", 23, "male", "senior"); Mentor Mark = new Mentor(); Mentor Laci = new Mentor(); Console.WriteLine("Laci's goal is: " + Laci.GetGoal()); Console.WriteLine(Levi.Introduce()); Sponsor company = new Sponsor(); for (int i = 0; i < 3; i++) { company.Hire(); } Console.WriteLine(company.Introduce(), company.GetGoal()); Cohort fulvipesCohort = new Cohort("Fulvipes"); fulvipesCohort.AddStudent(Kinga); fulvipesCohort.AddStudent(Nori); fulvipesCohort.AddStudent(Bence); fulvipesCohort.AddStudent(Lili); fulvipesCohort.AddMentor(Mark); fulvipesCohort.AddMentor(Laci); fulvipesCohort.AddMentor(Levi); Console.WriteLine(fulvipesCohort.Info()); Console.ReadKey(); }