Advertisement
dsavov_02

za doreshavane

Apr 7th, 2019
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.79 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace ConsoleApp19
  8. {
  9.     class Program
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.             Team players = new Team();
  14.         }
  15.     }
  16. }
  17. class Team
  18. {
  19.     private String name;
  20.     private List<Person> players;
  21.    
  22.        
  23.     public void AddPerson(Person person)
  24.     {
  25.     players.Add(person);
  26.     }
  27.     public void RemovePerson(Person person)
  28.     {
  29.         players.Remove(person);
  30.     }
  31. }
  32. class Person
  33. {
  34.     private string name;
  35.     private int age;
  36.     private string country;
  37.     public Person(string name, int age, string country)
  38.     {
  39.         this.name = name;
  40.         this.age = age;
  41.         this.country = country;
  42.     }
  43. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement