Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace ConsoleApp19
- {
- class Program
- {
- static void Main(string[] args)
- {
- Team players = new Team();
- }
- }
- }
- class Team
- {
- private String name;
- private List<Person> players;
- public void AddPerson(Person person)
- {
- players.Add(person);
- }
- public void RemovePerson(Person person)
- {
- players.Remove(person);
- }
- }
- class Person
- {
- private string name;
- private int age;
- private string country;
- public Person(string name, int age, string country)
- {
- this.name = name;
- this.age = age;
- this.country = country;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement