Workshop
The workshop includes quiz questions to help gauge your grasp of the material. You'll find the answers to this quiz in an Appendix A. Even if you feel that you completely understand the concepts presented here, you should work through the quiz anyway. The last section contains some exercises to help reinforce your learning.
Quiz
Which real-world objects do the clsCard and clsDeck classes represent?
How does the clsDeck class use the clsCard class?
How can you calculate the suit of a card represented by a clsCard object?
How can you calculate the card's suit?
Which modules do you need to add to your programs to use the card classes?
Which module defines the constants that are used with the card classes?
How do you get the cards represented by a clsDeck object into random order?
How can you ensure that the frmCards.frm is removed from memory when the player quits your card game?
Exercises
Write a short program that deals four six-card hands. Overlap the cards in each hand by 10 pixels.
Write a short program that shuffles the deck and then deals 10 cards, one each time the user clicks the form. After the 10th card, reset the deck so that the same 10 cards are dealt again.