Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

All that is needed is the CODE and it MUST be all done with C# in Visual Studio 2022 . Also, add at least 4-5

image text in transcribed

image text in transcribed

All that is needed is the CODE and it MUST be all done with C# in Visual Studio 2022. Also, add at least 4-5 comments to the code to better explain it. The following additions MUST be added to the code as well. There are also other mandatory requirements below:

Here are the Modifications and Additions that must be added: - Instead of 2 dice, have 3. The possible totals will therefore be 3 18. - It states to summarize the results in tabular format, so what you should display is a 17 x 3 grid. In the first row, display Sum, Frequency and Percentage. In the remaining 16 rows, you should display the results. The first column will contain the values 3 18 (the possible sums). In the second column, display how frequently that sum was rolled (the count values from your array). In the third column, display the calculated percent with 2 decimal digits (e.g. 750/36, 000 = 2.08%). - Also, after displaying the table, display which total had the highest frequency and which had the lowest frequency.

Please do all of this in C# in Visual Studio 2022! Thanks!

8.17 (Dice Rolling) Write an app to simulate the rolling of two dice. The app should use an object of class Random once to roll the first die and again to roll the second die. The sum of the two values should then be calculated. Each die can show an integer value from 1 to 6 , so the sum of the values will vary from 2 to 12 , with 7 being the most frequent sum and 2 and 12 the least frequent sums. Figure 8.26 shows the 36 possible combinations of the two dice. Your app should roll the dice 36,000 times. Use a one-dimensional array to tally the number of times each possible sum appears. Display the results in tabular format. Determine whether the totals are reasonable (e.g., there are six ways to roll a 7, so approximately one-sixth of the rolls should be 7). Fig. 8.26 The 36 possible sums of two dice

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

XML Data Management Native XML And XML Enabled Database Systems

Authors: Akmal Chaudhri, Awais Rashid, Roberto Zicari, John Fuller

1st Edition

0201844524, 978-0201844528

More Books

Students also viewed these Databases questions