Everyone has played Yahtzee... Right? There are so many better dice games, but my family likes this one the best. A YouTube video that describes Yahtzee can be found here. The basic rules are as follows: • At the start of your turn you roll five normal everyday six sided dice. • In the course of your turn you would choose to reroll any of the dice up to two more times. • We are more concerned in this problem with the dice at the completion of your turn. This website gives a great rundown of the probabilities of Yahtzee that you will need. NOTE: You may ONLY use a set and map data structure to complete the solution to this problem Let's see what results the dice give us using the following data structures and process: • Prompt the user to enter five valid numbers (Range: One to six inclusive on both ends) • Each time the user enters a valid number, "place" it into a map of integersCreate and use a set of integers with your data to determine if it is a Yahtzee! (5 of a kind) • "Key" will be the die roll value • "Value" will be the number of times the die value was rolled • If needed, use this set of integers and the map of integer keys and integer values to determine the rest of the possible results • Display to the user ONLY the best of the seven possible results that they have achieved with the result of their turn 1.5 of a kind (Ordered best to worst here) 2.4 of a kind 3. Full house (3 of a kind plus one pair) 4.3 of a kind 5. Large straight (5 consecutive values in a row... 12345 or 23456 for examples) 6. Small straight (4 consecutive values in a row... 12346 or 11234 for examples) 7. Nothing (None of the above)

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

- In your OWN Words only!!!

- Give me the answer in Visual Studio without any error

- Separate the file if there is .cpp, .h file

- Do not give me the code from online websites such as ChatGPT, Bing etc..

 

 

Everyone has played Yahtzee... Right? There are so many better dice games, but my family likes this one the best.
A YouTube video that describes Yahtzee can be found here.
The basic rules are as follows:
• At the start of your turn you roll five normal everyday six sided dice.
• In the course of your turn you would choose to reroll any of the dice up to two more times.
• We are more concerned in this problem with the dice at the completion of your turn.
This website gives a great rundown of the probabilities of Yahtzee that you will need.
NOTE: You may ONLY use a set and map data structure to complete the solution to this problem
Let's see what results the dice give us using the following data structures and process:
• Prompt the user to enter five valid numbers (Range: One to six inclusive on both ends)
• Each time the user enters a valid number, "place" it into a map of integersCreate and use a set of integers with your data to determine if it is a Yahtzee! (5 of a kind)
• "Key" will be the die roll value
• "Value" will be the number of times the die value was rolled
• If needed, use this set of integers and the map of integer keys and integer values to determine the rest of the possible results
• Display to the user ONLY the best of the seven possible results that they have achieved with the result of their turn
1.5 of a kind (Ordered best to worst here)
2. 4 of a kind
3. Full house (3 of a kind plus one pair)
4.3 of a kind
5. Large straight (5 consecutive values in a row... 12345 or 23456 for examples)
6. Small straight (4 consecutive values in a row... 12346 or 11234 for examples)
7. Nothing (None of the above)
Transcribed Image Text:Everyone has played Yahtzee... Right? There are so many better dice games, but my family likes this one the best. A YouTube video that describes Yahtzee can be found here. The basic rules are as follows: • At the start of your turn you roll five normal everyday six sided dice. • In the course of your turn you would choose to reroll any of the dice up to two more times. • We are more concerned in this problem with the dice at the completion of your turn. This website gives a great rundown of the probabilities of Yahtzee that you will need. NOTE: You may ONLY use a set and map data structure to complete the solution to this problem Let's see what results the dice give us using the following data structures and process: • Prompt the user to enter five valid numbers (Range: One to six inclusive on both ends) • Each time the user enters a valid number, "place" it into a map of integersCreate and use a set of integers with your data to determine if it is a Yahtzee! (5 of a kind) • "Key" will be the die roll value • "Value" will be the number of times the die value was rolled • If needed, use this set of integers and the map of integer keys and integer values to determine the rest of the possible results • Display to the user ONLY the best of the seven possible results that they have achieved with the result of their turn 1.5 of a kind (Ordered best to worst here) 2. 4 of a kind 3. Full house (3 of a kind plus one pair) 4.3 of a kind 5. Large straight (5 consecutive values in a row... 12345 or 23456 for examples) 6. Small straight (4 consecutive values in a row... 12346 or 11234 for examples) 7. Nothing (None of the above)
Expert Solution
steps

Step by step

Solved in 4 steps with 6 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY