Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Advanced Java Programming with Object-Oriented Programming Design VERY IMPORTANT NOTE!!: This program for the question below MUST USE at least 2 CLASSES, getters/setters, etc and

image text in transcribed

Advanced Java Programming with Object-Oriented Programming Design

VERY IMPORTANT NOTE!!: This program for the question below MUST USE at least 2 CLASSES, getters/setters, etc and other object-oriented design (OOD) concepts because I'm in a more advanced Java class that requires me to utilize the concepts mentioned above. Also, I need detailed, but brief comments to most, if not all of the code to explain what is being used in the code and what is does so I have a better understanding of the code. I've seen answers to the question below already posted, however they don't utilize object-oriented design (OOD) concepts such as a minumum of two classes, getters/setters, etc which is required for this advanced Java programming class. So please......answer the question and meet the requirements for this question. Basically, I need advanced Java object-oriented design concepts for simple programs so here's to hoping this works out and if it does, I'll give a thumbs up, I promise!!!

Write an application to simulate the rolling of two dice. The application 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. Figure 7.28 shows the 36 possible combinations of the two dice. Your application should roll the dice 36,000,000 times. Use a one-dimensional array to tally the number of times each possible sum appears. Display the results in tabular format.

4 5 67 8 9 10 5 6 7 8 9 10 1 6 7 8 9 10 1112 Fig. 7.28 The 36 possible sums of two dice. 4 5 67 8 9 10 5 6 7 8 9 10 1 6 7 8 9 10 1112 Fig. 7.28 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

Probabilistic Databases

Authors: Dan Suciu, Dan Olteanu, Christopher Re, Christoph Koch

1st Edition

3031007514, 978-3031007514

More Books

Students also viewed these Databases questions

Question

List and briefly describe the types of bond mutual funds.

Answered: 1 week ago