Information and
Pictures
This file contains detailed information
about each flag required for project #2 and pictures of each flag in two
different sizes. Realize that these are just examples – two randomly
chosen sizes. From the description, you need to be able to extend this to
any other valid size for that flag.
The Austrian flag is three equally
spaced horizontal stripes where the top and the bottom stripes are red
and the center stripe is white.
The height specified by the user must
be a multiple of three. The multiple of three allows the three
stripes to be of the same size. If a
“non-multiple of 3” value is given, the error flag must be drawn instead.

Size 6

Size 15
The Nigerian flag is three equally
spaced vertical stripes where the left and the right stripes are green
and the center stripe is white.
The height specified by the user must be a multiple of three.
The multiple of three allows the three stripes to be of the same size. If a “non-multiple of 3” value is given, the
error flag must be drawn instead.

Size 6

Size 12
The flag for
Thailand is five equally spaced horizontal stripes. The top and the bottom stripes are red. The center stripe is blue.
The height
specified by the user must be a multiple of five. If a value is
given that is not a multiple of five, the error flag must be drawn instead.

Size 5

Size 25
The flag for
Latvia three horizontal stripes, but the stripes are not equally sized. The top and the bottom stripes (the red ones) are twice as large as the
center stripe (the white one).
The height as
specified by the user for this flag must be a multiple of five.
This will allow the top and the bottom to each be two fifths of the flag while
the center is one fifth. If a
non-multiple of five is given as the height specified by the user, the error
flag must be drawn instead.

Size 5

Size 10
The flag for The
Sudan has three equally spaced horizontal stripes (red, white and then black) with a green triangle from the left side.
The triangle must cover the whole left side of the flag and then get one
smaller on each side in each column until it comes to a point in the vertical
center of the flag. If the size of the
flag given is even it will appear like a flat point, but if the size given is
odd it will be an actual one cell point.
The height
specified by the user for this flag must be a multiple of three.
If a non-multiple of three is given, the error flag must be drawn instead.

Size 9

Size 24
The flag for
Puerto Rico is has five equally spaced horizontal stripes alternating red and
white and a blue triangle from
the left side. (It also has a star in
the blue area, but we will skip the star for ease in drawing.) The triangle must cover the whole left side
of the flag and then get one smaller on each side in each column until it comes
to a point in the vertical center of the flag.
If the size of the flag given is even it will appear like a flat point,
but if the size given is odd it will be an actual one cell point.
The height
specified by the user for this flag must be a multiple of five. If
a value is given that is not a multiple of five, the error flag must be drawn
instead.

Size 5

Size 20
The flag for
England has a white background with red vertical and horizontal lines in
the center each direction. The vertical
line will be exactly two pixels wide, and the horizontal line will be exactly
two pixels high.
The height
specified by the user for this flag must be even. If an odd value
is given, the error flag must be drawn instead.

Size 6

Size 12
The flag for the
Dominican Republic has a white vertical line and a white horizontal line
as described for England. But here the
top right and bottom left quarter are red,
and the top left and the bottom right quarters are blue.
The height
specified by the user for this flag must be even. If an odd value
is given, the error flag must be drawn instead.

Size 6

Size 20
The flag for
Antigua and Barbuda two red
triangles in the bottom right and the bottom left corners. The top two fifths of the center section is black, the center one fifth is blue, and the bottom two fifths is white.
(One line of the white will be lost where the red triangles come
together at the bottom, center of the flag.) (note: There is also a yellow sun
in the black area that we will skip for ease in drawing.)
The height
specified by the user for this flag must be a multiple of five.
This will allow the center section to be divided correctly between the black,
blue and white portions. If value is
given that is not a multiple of five, the error flag must be drawn instead.

Size 5

Size 20
Invalid/Error
Flag
The error flag should be displayed as a white flag
with a single red square in each of the four corners. If the height given
by the user between 4 and 30 (inclusive), but the dimensions are not allowed by
that specific flag as defined above, the error flag should be displayed in the
dimensions given by the user. If the size given is less than 4, the
exampleDriver creates a flag that is 4 high for you to display the error flag
in. If the size given is greater than 30, the exampleDriver creates a
flag that is 4 high for you to display the error flag in. If the
flag is between 4 and 30 (inclusive), but the countryCode is not one provided by
the menu, the Error Flag of the specified size should be created.

Size Requested: -15

Size Requested: 15 but requested on a flag whose size needed to be
even