コード例 #1
0
        static void Main(string[] args)
        {
            Coach myCoach = new Coach(52);

            for (int i = 0; i < 52; i++)
            {
                Person p = new Person("unset", 0);
                Console.WriteLine("Enter name");
                p.setName(Console.ReadLine());
                if (myCoach.AddPerson(p) == true)
                {
                    Console.WriteLine("success");
                }
                else
                {
                    Console.WriteLine("Failure");
                }
            }
        }
コード例 #2
0
ファイル: Program.cs プロジェクト: rgm9496/HFSCprojects
        static void Main(string[] args)
        {
            Coach myCoach = new Coach();

            for (int i = 0; i < 52; i++)
            {
                Person p = new Person();

                Console.WriteLine(" Enter Name ");

                p.SetName(Console.ReadLine());

                if (myCoach.AddPerson(p) == true)
                {
                    Console.WriteLine("success");
                }
                else
                {
                    Console.WriteLine("false");
                }
            }
        }