
Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
Information about a university homework assignment in the data structures i course at wentworth institute of technology, spring 2007. Students are required to build a simulation using stacks to calculate poker hand probabilities by processing 2 million poker hands. The assignment includes instructions, due date, and contact information for the instructor. Extra credit options are also provided.
Typology: Assignments
1 / 1
This page cannot be seen from the preview
Don't miss anything!
COMP380 Section 71 - Data Structures I - Spring, 2007
Instructor: Bob Goldstein (617) 912- bob.goldstein@schepens.harvard.edu http://home.comcast.net/~goldsteinr/Courses/index.html http://goldstein.eri.harvard.edu/courses/index.html http://myweb.wit.edu/goldsteinr/Courses/index.html Due Date: April 17, 2007 Hand In: Printout of program code and dialogue of how it runs. Purpose: Build a simulation by working with stacks. Description: Use the classes “PlayingCard” and “CardDeck” to build 2 million poker hands to calculate poker hand probabilities. For each poker hand, start with a freshly shuffled deck. Then pop the top 5 cards off the deck to get one poker hand. You then need to examine the hand to see which of the below categories the hand falls into. Maintain counters for each of the hand types. The tricky part of this assignment is to determine which of the below categories the hand falls into. After the 2 million hands are run, see how your numbers compare with the below numbers that were pulled off the internet. FOR THE MAIN PART OF THE HOMEWORK ASSIGNMENT, ONLY DO THE “One Pair”, “Two Pair”, “Three of a kind” and “Straight” categories. PROBABILITIES OF FIVE-CARD POKER HANDS Hand Number Approx Odds (to 1) Royal Flush Straight flush Four of a kind Full House Flush Straight Three of a kind Two pairs one pair No hand
Extra Credit: