Computing with C# and the .NET Framework by Arthur Gittleman

Computing with C# and the .NET Framework by Arthur Gittleman

Author:Arthur Gittleman [Gittleman, Arthur]
Language: eng
Format: mobi, azw3
Publisher: Jones & Bartlett Learning
Published: 2011-01-09T22:00:00+00:00


25. Write a program to draw a stick figure of the following form (more artistically if you like).

26. Write a program to draw a stick figure. Combine hair, face, and body to make the figure. Create Hair, Face, and Body classes to draw each of these parts. Each class will have a Draw method that accepts a Graphics parameter. Use that Graphics object to draw that part. Do the drawing relative to the size of the window. If the window gets larger, the figure should get larger also.

One approach might be to use a round face and locate all three parts of the figure using the center and radius of the face. The hair might use a line of random length from each point of the upper semicircle of the face. The equation of a circle is:



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.