예제 #1
0
파일: Creator.cs 프로젝트: joachimda/I4PRJ
        public Pool MandatoryAssemblyOfPool(User user) //Template method
        {
            Pool pool = new Pool {User = user};
            //This is assigning the pool to the user??
            Console.WriteLine("You are now creating a pool system, and we need some information to create your pool..");

            pool.Name = NewPoolPromptForPoolName();
            pool.PoolDimension = NewPoolPromptForPoolDimensions(pool);
            //pool.UserUserId = user.UserId; //Is this the assignment thingy?
            return pool;
        }
예제 #2
0
파일: Creator.cs 프로젝트: joachimda/I4PRJ
        private static PoolDimensions NewPoolPromptForPoolDimensions(Pool pool)
        {
            PoolDimensions poolDimensions = new PoolDimensions {Pool = pool};

            Console.WriteLine("How deep is your pool?");
            poolDimensions.Depth = Console.Read();

            Console.WriteLine("How long is your pool?");
            poolDimensions.Length = Console.Read();

            Console.WriteLine("How wide is your pool?");
            poolDimensions.Width = Console.Read();

            return poolDimensions;
        }