Yorkville High School Computer Science Department
Yorkville High School Computer Science Department on Facebook  Yorkville High School Computer Science Department Twitter Feed  Yorkville High School Computer Science Department on Instagram

Yorkville High School Computer Science

ASSIGNMENTS: Barron's Ch. 3 Review (1-10, 12, 14-17) - November 21, 2017 :: APCS Free-Response Part 1 - December 6, 2017 :: APCS Free-Response Part 2 - December 7, 2017

AP Computer Science :: Projects :: Roll of the Dice

Problem

Download this project skeleton to start this project. From your program's main method, get input from the user to simulate a certain number of die rolls. Check this website for three methods to get input from the user. System.in is probably the easiest to implement. Once the simulation is over, the output should display graphs indicating the number of times each die roll value occurred. An array should be used to keep track of how many times each possible sum is rolled. The graph should look something like the following:

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

Make sure the bar graphs don't get too long so they scroll off the console window.

Yorkville High School Computer Science Department on Facebook Yorkville High School Computer Science Department Twitter Feed Yorkville High School Computer Science Department on Instagram