Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

JAVA DICE ROLL GAME! Use for loops and arrays to create the ultimate dice game! You must use two java classes. The first, use a

JAVA DICE ROLL GAME!

Use for loops and arrays to create the ultimate dice game! You must use two java classes. The first, use a method to generate a value based on the number of sides, a method that rolls one to three dice that results in a total and assigned to the array. Then one more to print the array that displays all of your rolls. Then you must create a tester class to ask for the number of rolls and number of dice. And then call your three previous methods. Your output should be similar to:

How many dice? 1-3: 3

Number of rolls: 3

Roll 1: 7

Roll 2: 9

Roll 3: 14

Roll the number: Times:

3 0

4 2

5 0

7 1

etc.

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

Students also viewed these Databases questions