Example #1
0
        public void MyCode()
        {
            // The FIRST line of code should be BELOW this line

            DrawingTool drawer = new DrawingTool();

            // ShapeA
            Console.WriteLine("Shape A, 10 stars in a row \r\n");

            for (int i = 0; i < 11; i++)
            {
                drawer.DrawOneStar();
            }

            // ShapeB
            Console.WriteLine("\r\n Shape B, 5 stars in a row, separated by space \r\n");

            for (int i = 0; i < 5; i++)
            {
                drawer.DrawOneStar();
                drawer.DrawOneSpace();
            }

            // Shape C
            Console.WriteLine("\r\n Shape C, 10 rows with 10 starts in each \r\n");

            for (int i = 0; i < 10; i++)
            {
                drawer.DrawOneStar(); drawer.DrawOneStar(); drawer.DrawOneStar(); drawer.DrawOneStar(); drawer.DrawOneStar();
                drawer.DrawOneStar(); drawer.DrawOneStar(); drawer.DrawOneStar(); drawer.DrawOneStar(); drawer.DrawOneStar();
                drawer.StartNewLine();
            }

            // Shape D
            Console.WriteLine("\r\n Shape D, * **, whatever that is \r\n");

            for (int i = 0; i < 1; i++)
            {
                drawer.DrawOneStar();
                drawer.DrawOneSpace();
                drawer.DrawOneStar(); drawer.DrawOneStar();
            }

            // Shape E
            Console.WriteLine("\r\n Shape E, a big X");

            for (int i = 0; i < 1; i++)
            {
                drawer.DrawOneStar(); drawer.DrawOneSpace(); drawer.DrawOneStar(); drawer.StartNewLine();
                drawer.DrawOneSpace(); drawer.DrawOneStar(); drawer.StartNewLine();
                drawer.DrawOneStar(); drawer.DrawOneSpace(); drawer.DrawOneStar();
            }
        }
Example #2
0
        public void MyCode()
        {
            // The FIRST line of code should be BELOW this line

            DrawingTool drawer = new DrawingTool();


            // YOUR JOB: Add code to draw shapes
            Console.WriteLine("2. Shape A");
            for (int i = 0; i < 10; i++)
            {
                drawer.DrawOneStar();
            }
            Console.WriteLine();

            Console.WriteLine("2. Shape B");
            for (int i = 0; i < 5; i++)
            {
                drawer.DrawOneStar();
                drawer.DrawOneSpace();
            }
            Console.WriteLine();

            Console.WriteLine("2. Shape C");
            for (int i = 0; i < 10; i++)
            {
                for (int y = 0; y < 10; y++)
                {
                    drawer.DrawOneStar();
                }
                drawer.StartNewLine();
            }
            Console.WriteLine();


            Console.WriteLine("2. Shape D");
            for (int i = 0; i < length; i++)
            {
            }
            Console.WriteLine();

            // The LAST line of code should be ABOVE this line
        }
        public void MyCode()
        {
            // The FIRST line of code should be BELOW this line

            DrawingTool drawer = new DrawingTool();

            // YOUR JOB: Add code to draw shapes

            for (int i = 0; i < 10; i++)
            {
                drawer.DrawOneStar();
            }

            drawer.StartNewLine();

            for (int i = 0; i < 5; i++)
            {
                drawer.DrawOneStar();
                drawer.DrawOneSpace();

            }

            drawer.StartNewLine();

            for (int i = 0; i < 10; i++)
            {
                for (int a = 0; a < 10; a++)
                {
                    drawer.DrawOneStar();
                }
                drawer.StartNewLine();
            }

            drawer.StartNewLine();
            drawer.StartNewLine();

            for (int i = 0; i < 10; i++)
            {
                for (int b = 0; b <= i; b++)
                {
                    drawer.DrawOneStar();
                }
                drawer.StartNewLine();
            }

            drawer.StartNewLine();
            drawer.StartNewLine();

            for (int y = 0; y < 10; y++)
            {
                for (int x = 0; x < 10; x++)
                {
                    if ((x == y) || (x + y == 9))
                    {
                        drawer.DrawOneStar();
                    }
                    else
                    {
                        drawer.DrawOneSpace();
                    }
                }
                drawer.StartNewLine();
            }

            // The LAST line of code should be ABOVE this line
        }