Program that simulates the rolling of two 6-sided dice

Assignment Help JAVA Programming
Reference no: EM131590738

Write a program that simulates the rolling of two 6-sided dice. Use an Array to keep track of the number of times that each total number is thrown. In other words, keep track of how many times the combination of the two simulated dice is 2, how many times the combination is 3, and so on, all the way up through 12.

Allow the user to choose how many times the "dice" will be thrown. Then, once the dice have been thrown the specified number of times, print a histogram (using the * character) that shows the total percentage each number was rolled. Each * will represent 1% of the total rolls.


Sample session:

Welcome to the dice throwing simulator!
How many dice rolls would you like to simulate? 1000 DICE ROLLING SIMULATION RESULTS
Each "*" represents 1% of the total number of rolls. Total number of rolls = 1000.

2: ***
3: ***
4: ***********
5: ***********
6: ********
7: ******************
8: ****************
9: **********
10: *************
11: *****
12: **

Thank you for using the dice throwing simulator. Goodbye!

 

 

Reference no: EM131590738

Questions Cloud

Determine the location of the image : An object is 19 cm in front of a diverging lens with a focal length of -10 cm.
Required projects with the cash flows : Suppose your firm is considering two mutually exclusive, required projects with the cash flows shown below.
Compute the total cost of ordering and carrying inventory : A product has a demand of 4000 units per year. Ordering cost is $20, and holding cost is $4 per unit per year.etermine the economic order quantity?
What is the light''s frequency in the solid : A light wave has a 670 nm wavelength in air. Its wavelength in a transparent solid is 450 nm.
Program that simulates the rolling of two 6-sided dice : Write a program that simulates the rolling of two 6-sided dice. Use an Array to keep track of the number of times that each total number is thrown
Constant growth stock has dividend yield : A constant growth stock has a dividend yield of 5%, a required return of 10% and is expected to sell for $59.1 three years from now.
Define the future of the juvenile justice system : Create a proposal to be presented to the state legislature concerning the future of the juvenile justice system, as a juvenile justice consultant.
What is the frequency of wave : What is the frequency of this wave? What is the wavelength of this wave?
How does commercialization affect our society : How does commercialization affect our society? How does the notion of a profit-making venture affect what is created for mass entertainment

Reviews

Write a Review

JAVA Programming Questions & Answers

  Recursive factorial program

Write a class Array that encapsulates an array and provides bounds-checked access. Create a recursive factorial program that prompts the user for an integer N and writes out a series of equations representing the calculation of N!.

  Hunt the wumpus game

Reprot on Hunt the Wumpus Game has Source Code listing, screen captures and UML design here and also, may include Javadoc source here.

  Create a gui interface

Create GUI Interface in java programing with these function: Sort by last name and print all employees info, Sort by job title and print all employees info, Sort by weekly salary and print all employees info, search by job title and print that emp..

  Plot pois on a graph

Write a JAVA program that would get the locations of all the POIs from the file and plot them on a map.

  Write a university grading system in java

University grading system maintains number of tables to store, retrieve and manipulate student marks. Write a JAVA program that would simulate a number of cars.

  Wolves and sheep: design a game

This project is designed a game in java. you choose whether you'd like to write a wolf or a sheep agent. Then, you are assigned to either a "sheep" or a "wolf" team.

  Build a graphical user interface for displaying the image

Build a graphical user interface for displaying the image groups (= cluster) in JMJRST. Design and implement using a Swing interface.

  Determine the day of the week for new year''s day

This assignment contains a java project. Project evaluates the day of the week for New Year's Day.

  Write a java windowed application

Write a Java windowed application to do online quiz on general knowledge and the application also displays the quiz result.

  Input pairs of natural numbers

Java program to input pairs of natural numbers.

  Create classes implement java interface

Interface that contains a generic type. Create two classes that implement this interface.

  Java class, array, link list , generic class

These 14 questions covers java class, Array, link list , generic class.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd