Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Hi, i am creating a java craps game, and i just need someone to help me compile

ID: 3544379 • Letter: H

Question

Hi, i am creating a java craps game, and i just need someone to help me compile it, and indent it, and create a while loop that


public class Craps {

public static void main(String[] args) {

for(int i=1; i<=10; i++)

System.out.println(rollDie(6));




public static int rollDie(int a){

return(int)(Math.random()*a)+1;

}


public static int rollDice(){

return (rollDie(6) + (rollDie(6)));

}


public static boolean playOneGame(){

int sum = rollDice();

if(sum == 7 || sum == 11){

return true;

}


else if(sum == 2 || sum == 3 || sum == 12 ){

return false;


} else

{


}

}

Explanation / Answer

Please goto this link I have already answered your question:


http://www.chegg.com/homework-help/questions-and-answers/hi-i-creating-java-craps-game-i--i-just-need-game-thing-player-rolls-pair-dice-sum-roll-7--q4455376


Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote