/// <summary> /// Constructor, creating CountryFactory and RacerFactory /// </summary> public Logic() { CountryFac = new CountryFactory(); RacerFac = new RacerFactory(); }
/// <summary> /// Metoda, ktora prida pretekara do zoznamu pretekarov /// </summary> /// <param name="startNumber">startovacie cislo</param> /// <param name="name">mano</param> /// <param name="age">vek</param> /// <param name="gender">pohlavie</param> /// <param name="country">krajina</param> public void Add(int startNumber, string name, int age, Gender gender, string country) { Racer racer = RacerFactory.CreateRacer(startNumber, name, age, gender, country); Racers.Add(racer); }