March 5, 2015

Homework Help: Computer Science Java

Posted by Lisa on Tuesday, October 13, 2009 at 12:37am.

I have to write program for a dice game and use a boolean variable in the application class of the dice game that equals true when snake eyes, doubles, and box cars have been meet. I am having a little trouble doing that in my application class so I was wondering if somebody can help me out. This is how my application class looks now:

package classes;

public class DiceGameApp {

public static void main (String [] args) {

DiceGame dice = new DiceGame ();

for (int rollCount = 0; rollCount < 10; rollCount ++) {


System.out.println("\nYou rolled a " + dice.getDieone()+ " for dice one and a " +dice.getDietwo()+ " for dice two.");

if(dice.getDieone()== 1 && dice.getDietwo()== 1){

System.out.println ("\nYou have rolled snake eyes.");
if (dice.getDieone()== 6 && dice.getDietwo()== 6)

System.out.println("\nYou have rolled boxcars.");


System.out.println("\nYou have rolled doubles.");



Answer this Question

First Name:
School Subject:

Related Questions

Programming Logic - I need to create a flowchart/psuedocode for a dice game that...
English - Playing the dice game, have a conversation about what you must do and ...
Math - At this year's State Fair, there was a dice rolling game. If you rolled ...
English expression - Playing the dice game, write down suitable responses and ...
English expression - There is only one die in playing the dice game. They are ...
Algebra - You are a contestant on a game show and have the chance to win a car ...
English - Roll the dice. If you get 3 on the face of the dice, move forward for ...
Mathematics for Liberal Arts - You are on a TV show. You have been asked to ...
Help me please Maths - Calvin is playing a game of Dungeons and Dragons. In ...
Math - Suppose you play a game in which two fair standard dice are rolled. If ...