Home > Articles > Programming > Visual Basic

  • Print
  • + Share This

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

  1. Which real-world objects do the clsCard and clsDeck classes represent?

  2. How does the clsDeck class use the clsCard class?

  3. How can you calculate the suit of a card represented by a clsCard object?

  4. How can you calculate the card's suit?

  5. Which modules do you need to add to your programs to use the card classes?

  6. Which module defines the constants that are used with the card classes?

  7. How do you get the cards represented by a clsDeck object into random order?

  8. How can you ensure that the frmCards.frm is removed from memory when the player quits your card game?

Exercises

  1. Write a short program that deals four six-card hands. Overlap the cards in each hand by 10 pixels.

  2. 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.

  • + Share This
  • 🔖 Save To Your Account

Related Resources

There are currently no related titles. Please check back later.