card game
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Adam_Ibram
Posted On:   Wednesday, November 28, 2001 05:22 PM

I want to write a program called PackSimul.java which simulates the handling of a pack of cards. A normal pack has four suits (spades, hearts, clubs and diamonds) and each suit has thirteen cards in it (ace, king, queen, jack, 10, 9, 8, 7, 6, 5, 4, 3, 2,). i need to design a class called Cards, which contains, in its private data section, an array or vector structure of some sort which stores the cards. You should then provide a constructor method for a pack, and public instance methods called shuffle (which will shuffle the order of the cards randomly) and cut (which will cut the pack at a given point). If possible, allow for as much extension to this model as possible. I should also design a GUI class called displayGUI, which will presen   More>>

I want to write a program called PackSimul.java which simulates the handling of a pack of cards. A normal pack has four suits (spades, hearts, clubs and diamonds) and each suit has thirteen cards in it (ace, king, queen, jack, 10, 9, 8, 7, 6, 5, 4, 3, 2,).

i need to design a class called Cards, which contains, in its private data section, an array or vector structure of some sort which stores the cards. You should then provide a constructor method for a pack, and public instance methods called shuffle (which will shuffle the order of the cards randomly) and cut (which will cut the pack at a given point). If possible, allow for as much extension to this model as possible.

I should also design a GUI class called displayGUI, which will present the user with a window which will display all the 52 cards (I could have a large window, or I could have a drop-down box of some kind) and two button marked Cut and Shuffle respectively, which will cut and shuffle the pack. The effect of these operations should be seen in the window.

   <<Less
About | Sitemap | Contact