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.


1 Poland

o       The flag for Poland is white on the top half and red on the bottom half. 

o       The height of the flag specified by the user must be even.  If an odd value is given, the error flag must be drawn instead.

Size 4

 

Size 8

 


2 Ukraine

o       The flag for The Ukraine is blue on the top half and yellow on the bottom half. 

o       The height of the flag specified by the user must be even.  If an odd value is given, the error flag must be drawn instead.

 

Size 4

 

Size 10


 

3 The Czech Republic

o       The flag for The Czech Republic is white on the top half and red on the bottom half except for a blue triangle that is on the left side. 

o       The blue triangle starts with two full columns and then gets two squares smaller (one on the top and one on the bottom until they almost form a point). 

o       The height specified by the user must be even.  If an odd value is given, the error flag must be drawn instead.

 

Size 4

 

Size 24

 


4 Benin

o       The flag for Benin has a green rectangle on the left side and the rest of the flag is yellow on the top half and red on the bottom half. 

o       The rectangle on the left will cover exactly one third of the flag. 

o       The height as specified by the user for this flag must be a multiple of six.  If a non-multiple of six is given as the height specified by the user, the error flag must be drawn instead.

 

Size 6

Size 12

 

5 Rwanda

o       The flag for Rwanda has blue for the top half.  The bottom half is evenly split with yellow and green; the bottom quarter is green, the second quarter from the bottom is yellow. 

o       The height specified by the user for this flag must be a multiple of four.  If a non-multiple of four is given, the error flag must be drawn instead.

 

Size 4

Size 12

 


6 Bahamas

o       The flag for The Bahamas is blue except for a black triangle that is on the left side and a 2 high yellow stripe that goes across the blue portion in the middle.

o       The black triangle starts with two full columns and then gets two squares smaller (one on the top and one on the bottom until they almost form a point). 

o       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 4

 

Size 16


7 Afghanistan

o       The flag for Afghanistan has three equal vertical stripes.  The left third is black, the middle third is red and the right third is green. 

o       The height specified by the user for this flag must be a multiple of three.  If a non-multiple of three value is given, the error flag must be drawn instead.

 

Size 6

 

Size 12

 


8 Jersey

o       The flag for Jersey has a red X on a white background. 

o       The X is 2 wide at each step and one high because the flag is twice as wide as it is high. 

o       The height specified by the user for this flag must be odd.  If an even value is given, the error flag must be drawn instead.

 

Size 5

 

Size 9

 


9 Scotland

o       The flag for Scotland has a white X on a blue background. 

o       The X is 2 wide at each step and one high because the flag is twice as wide as it is high. 

o       The height specified by the user for this flag must be odd.  If an even value is given, the error flag must be drawn instead.

 

Size 5

 

Size 15


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

Web Accessibility