Homework #3

Topic:Flow Charts

Course:CS 102 – Basic Programming

Date Assigned:Sep 16, 2009

Date Due:Sep 23, 2009

Reading:4.1 – 4.5

1)Flow Chart.Please create a COMPLETE flowchart for the game of war. The game has TWO players. The game must handle all details of the game including,

  1. Setup and program initialization
  2. Shuffling the cards
  3. Display of important information
  4. Dealing the cards
  5. Determining a hand winner
  6. Wars
  7. Multiple-level wars
  8. One player being short of cards in a war
  9. Determining a winner
  10. Displaying a winner
  11. Playing another game
  12. Leaving the game
  13. Anything else you can think of

You should draw a complete flow chart for this game. Please remember the key symbols for a flowchart (in your notes if you need them). The flowchart should be neat and legible. You will use it later, so you want it to be nice!!

2)Screen. Please design the main screen/form for the game of War. This should be accomplished (and saved under the project name of ”War”) in Visual Basic. Take some time to think about what the display should look like. What elements must be on the screen? What looks good? What colors should be used? How do you display the cards? Is there enough room for everything? What is displayed (and where) for wars? Multiple wars?

Note: If you want bitmaps of the playing cards, you can download them from the class website.

Extra Credit: After your basic flowchart is complete, you can augment your flowchart to a more realistic one that you would see in a real game. The following is a partial list of additional features you might choose to add to your flowchart:

a)Multiple players (not just 2),

b)Give the players names that are displayed on the screen,

c)Remember and display the number of cards each player has,

d)Perhaps remember and show interesting statistics such as the number of wars each player has won, how many Aces each player has (or has won), and the number of hands in a row each player has won. Anything and everything is fair game here,

e)Other interesting additions you might come up with for the flowchart. If you want to discuss this more, or want to brainstorm ideas – please come by during office hours!

3)Trivia question (Subject: US History): You are in Detroit, MI. You get in your car and drive due South. What is the first country (not the USA!) that you come to. We are not talking territorial waters here, but dry land.