Created
December 15, 2016 17:57
-
-
Save gitaficionado/493be08d2cfd29705a4a13d2a8d5c6fc to your computer and use it in GitHub Desktop.
Programming Project 4..4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package chapter4; | |
import java.util.*; | |
public class BoxCars { | |
public static void main (String args[]) { | |
PairOfDie dice = new PairOfDie(); | |
________________________ // define integer called boxCarCounter and set it equal to zero | |
for(int i = 0; i < 1000; i++){ | |
dice.rollBothDie(); | |
if(dice.getDieTotal() == 12) | |
boxCarCounter ++; | |
} | |
// Create statement that will let the user know how many box cars occured after 1000 rolls. | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment