Question: //*** //*** Write a public static method named calculateUpperSectionCategory that //*** returns int and that receives an int parameter named dieNumber. //*** //*** Write the

//*** //*** Write a public static method named "calculateUpperSectionCategory" that //*** returns int and that receives an int parameter named "dieNumber". //*** //*** Write the method body code as follows: //*** 1) Declare an int variable named "score" and assign the value of zero to it. //*** 2) Write a println statement that displays the message "In method calculateUpperSectionCategory". //*** 3) Write a return statement that returns the variable "score". //***

//*** //*** Your method code goes here. //***

//*** //*** Write a public static method named "calculateThreeOfKind" that //*** returns int and receives no parameters. //*** //*** Write the method body code as follows: //*** 1) Declare an int variable named "score" and assign the value of zero to it. //*** 2) Declare a boolean variable named "isThreeKind" and assign the value of false to it. //*** 3) Write a println statement that displays the message "In method calculateThreeOfKind". //*** 4) Write a return statement that returns the variable "score".

//*** Write the method body code as follows: //*** 1) Declare a boolean variable named "gameOver" and assign the value of false to it. //*** 2) Write an if-statement that checks the following thirteen (13) variables for "equality to" SCORE_NO_VALUE. //*** Use the correct Java syntax for the "equality" operator. //*** Join the thirteen (13) conditions together using the "OR" operator. //*** Use the correct Java syntax for the "OR" operator. //*** 3) Write a statement that assigns the value of false to the variable "gameOver" if the condition //*** in step 2 evaluates to true //*** 4) Write an else-statement that is matched to the if-statement in step 2 that //*** assigns the value of true to the variable "gameOver" //*** 5) Write a return statement that returns the variable "gameOver".

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!