Hello! I am having trouble on how to write out the Java code based on the instructions (in bold //***) that I am given. As a note, this specific Java code is a code that is going to setup the basic framework for a game of Yahtzee. In other words, you will need to understand the rules of Yahtzee and implement the rules into coding. I appreciate the help. Thanks! Also, I am using the IntelliJ IDEA application when writing out this program. Here is what I need help with: //*** //*** INSTRUCTIONS FOR CODE FOR YOU TO WRITE //*** //*** 1) Write a public static method named "isGameOver" that //*** returns boolean and receives no parameters. //*** //*** 2) Write the method body code as follows: //*** A) Declare a variable named "gameOver" of boolean datatype. //*** B) Initialize variable "gameOver" to the value of false. //*** C) Write ONE if-statement whose condition is a Compound Boolean Expression comprised of thirteen (13) //*** Boolean Expressions using the && (AND) Boolean Operator to join them together. //*** a) Each of the thirteen (13) Boolean Expressions must check the following thirteen (13) variables for //*** "inequality to" (not equal to) SCORE_NO_VALUE: //*** 1) "aces" //*** 2) "twos" //*** 3) "threes" //*** 4) "fours" //*** 5) "fives" //*** 6) "sixes" //*** 7) "threeKind" //*** 8) "fourKind" //*** 9) "fullHouse" //*** 10) "smallStraight" //*** 11) "largeStraight" //*** 12) "yahtzee" //*** 13) "chance" //*** c) Use the correct Java syntax for the "inequality" operator. //*** D) Code block for if-statement in Step 2C: //*** a) Write a statement that assigns the value of true to the variable "gameOver". //*** E) Write a return statement that returns the variable "gameOver". //*** //*** //*** The written code goes here. //***
Hello! I am having trouble on how to write out the Java code based on the instructions (in bold //***) that I am given. As a note, this specific Java code is a code that is going to setup the basic framework for a game of Yahtzee. In other words, you will need to understand the rules of Yahtzee and implement the rules into coding. I appreciate the help. Thanks! Also, I am using the IntelliJ IDEA application when writing out this program. Here is what I need help with:
//***
//*** INSTRUCTIONS FOR CODE FOR YOU TO WRITE
//***
//*** 1) Write a public static method named "isGameOver" that
//*** returns boolean and receives no parameters.
//***
//*** 2) Write the method body code as follows:
//*** A) Declare a variable named "gameOver" of boolean datatype.
//*** B) Initialize variable "gameOver" to the value of false.
//*** C) Write ONE if-statement whose condition is a Compound Boolean Expression comprised of thirteen (13) //*** Boolean Expressions using the && (AND) Boolean Operator to join them together.
//*** a) Each of the thirteen (13) Boolean Expressions must check the following thirteen (13) variables for //*** "inequality to" (not equal to) SCORE_NO_VALUE:
//*** 1) "aces"
//*** 2) "twos"
//*** 3) "threes"
//*** 4) "fours"
//*** 5) "fives"
//*** 6) "sixes"
//*** 7) "threeKind"
//*** 8) "fourKind"
//*** 9) "fullHouse"
//*** 10) "smallStraight"
//*** 11) "largeStraight"
//*** 12) "yahtzee"
//*** 13) "chance"
//*** c) Use the correct Java syntax for the "inequality" operator.
//*** D) Code block for if-statement in Step 2C:
//*** a) Write a statement that assigns the value of true to the variable "gameOver".
//*** E) Write a return statement that returns the variable "gameOver".
//***
//***
//*** The written code goes here.
//***
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 1 images