November 30, 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

More Related Questions