コード例 #1
0
        static void Main(string[] args)
        {
            List <User> listOfUsers = new List <User>();

            listOfUsers.Add(new User("Any", "Novik", User.SexOfAPerson.female, 18));
            listOfUsers.Add(new User("Natasha", "Lesh", User.SexOfAPerson.female, 64));
            listOfUsers.Add(new User("Ivan", "Morz", User.SexOfAPerson.male, 25));
            listOfUsers.Add(new User("Vlad", "Sed", User.SexOfAPerson.male, 40));

            InputerDataAboutNewUser usersData = new InputerDataAboutNewUser(listOfUsers);

            listOfUsers.Add(usersData.InputData());
            usersData.Message += GetNamesake;
            CommandReceiver          receiver          = new CommandReceiver(listOfUsers);
            OldestUser               oldestUser        = new OldestUser(receiver);
            TheMostPopularFemaleName popularFemaleName = new TheMostPopularFemaleName(receiver);
            UsersAverageAge          averageAge        = new UsersAverageAge(receiver);
            SelectCommand            command           = new SelectCommand(receiver);

            command.MenuCommand();
        }
コード例 #2
0
 public SelectCommand(CommandReceiver receiver)
 {
     this.receiver = receiver;
 }