Flags Tutorial

From Progzoo
Revision as of 17:40, 7 January 2012 by Andr3w (Talk | contribs)

Jump to: navigation, search
If Tutorial >> | Quick Quiz

In these exercises you draw the flags of various countries using graphics commands. You make use of the Graphics2D class to complete these.

You will be using methods such as g.fillRect(x,y,h,w) to fill a rectangle w width and h high with the top left corner at (x,y).

Flags with Rectangles
The rectangles tutorial has you drawing the flags of Libya, France, Germany and Palau. You can draw these flags using only rectangles of different colors. These exercise introduce the basic graphics commands.
Flags with Lines
The lines tutorial includes flags that require lines. By changing the color and the thickness of the lines drawn you can produce the flags of England, Scotland, Botswana and Trinidad and Tobago.
Flags with Polygons
The polygons tutorial includes flags made with triangles and other polygons. The flags of Napier University, Jamaica and the Bahamas and the Seychelles require triangles and quadrilaterals.
Flags with Stars
The stars tutorial includes flags that feature five pointed stars. In each example the star has already been defined as a polygon. You have to translate and scale the star to show Vietnam, Panama, Bosina Herzeginia and Zaire.
Flags that Repeat
The repeats tutorial focuses on flags that include repetition. You can use loops, such as for to perform the same action many times. Draw the flag of Bahrain, Qatar, India, Namibia and the European Union.
Difficult Flags
The harder tutorials includes flags where the repetition is harder to exploited. To do this well you will use methods and parameters.
Road Signs
The road signs tutorials includes a whole range of problems, the first few are easy but the last lot represent a real challenge.