Download or clone the C# project DrawShapes.
This exercise is about trying to draw some simple shapes on the screen, using for-loops to get the job done. A very simple class DrawingTool is provided to help with this.
-
Study the class DrawingTool. As you can see, it is very simple. Are there any good reason to have such a class at all?
-
Using for-loops and the DrawingTool class, see if you can draw the following five simple shapes on the screen (they do become harder and harder, tough…). Just write the code in InsertCodeHere.cs as usual.
Shape A (10 stars in a row):
Shape B (5 stars in a row, separated by spaces):
Shape C (10 rows of 10 stars each):
Shape D (So, what is this then…?): * **
Shape E (A big “X”, I guess…?):