Question: Write a program that demonstrates the Dice class from the previous problem. This program will roll twoDice objects repeatedly, add the value from the two


Write a program that demonstrates the Dice class from the previous problem.

This program will roll twoDice objects repeatedly, add the value from the two dices together, to display a total for that roll.

Use a loop to do this150 times. This simulates150 independent rolls of two dice.

The program should keep track of how many times each total value (from 2 - 12) appears, and output the totals at the end.

Program output could look like this. The formatting is not required, but the content is.

Rubric: < Student name and date is in a comment on thefirst line of the programs: -5 points if fails All values 2-12

Rubric: < Student name and date is in a comment on the first line of the programs: -5 points if fails All values 2-12 occur in the totals: -10 if fails < Main program loop: dice totals correct number of times: -15 points if fails < Main program loop: 5 points Main program count outcome for totals: 10 points < Please paste a screenshot of a successful program run, and copy-and-paste the source code from both. java files, here: < CS143-W1 Lab: Classes and Objects Page 7 of 8

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!