How do we design a project?

1.  Start with the problem statement

           " Design a Blackjack Simulator "

2.  Express the project in abstract, but solvable, pieces

  • First,  shuffle the cards
  • Second, deal 2 cards to the player and 2 cards to the dealer
  • Third, deal the player's hand until he busts or stays
  • Fourth, if the player didn't lose, deal the dealer's hand until the dealer wins or lose
  • 3. Take each of the pieces and write out the logic necessary to code that piece
     
                   I assert that this algorithm, if coded correctly,
                will make a simplified version of Blackjack
               (Putting in all the Vegas Rules is left as an exercise for the reader)

    4.  Take this algorithm and write pseudocode for whatever language you are coding for
     

    5. Finally,     Sit down at the computer with your design,
                          Code it,
                          Test it,
                          Debug it,
                          Test it,
                          Debug it,
                          Test it,  Test it some more, Test it some more....

          And release it to the world
     
    (To see a working version of the BlackJack code based on this design, click Here)