Program in C++ & Visual Studio not Studio Code 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 5 of a kind (Ordered best to worst here) 4 of a kind Full house (3 of a kind plus one pair) 3 of a kind Large straight (5 consecutive values in a row...  12345 or 23456 for examples) Small straight (4 consecutive values in a row...  12346 or 11234 for examples) Nothing (None of the above)

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

Program in C++ & Visual Studio not Studio Code

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)
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)
o "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) o "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
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps with 5 images

Blurred answer
Knowledge Booster
Reference Types in Function
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education