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 "calculateUpperSectionCategory" that
//*** returns int and that receives an int parameter named "dieNumber".
//***
//*** 2) Write the method body code as follows:
//*** A) Declare a variable named "score" of int datatype.
//*** B) Initialize variable "score" to the value of 0 (zero).
//*** C) Write a println statement that displays the message:
//*** "In method calculateUpperSectionCategory".
//*** D) Write a return statement that returns the variable "score".
//***
//***
//*** Your method code goes here.
//***
//***
//*** INSTRUCTIONS FOR CODE FOR YOU TO WRITE
//***
//*** 1) Write a public static method named "calculateThreeOfKind" that
//*** returns int and receives no parameters.
//***
//*** 2) Write the method body code as follows:
//*** A) Declare a variable named "score" of int datatype.
//*** B) Initialize variable "score" to the value of 0 (zero).
//*** C) Declare a variable named "isThreeKind" of boolean datatype.
//*** D) Initialize variable "isThreeKind" to the value of false.
//*** E) Write a println statement that displays the message:
//*** "In method calculateThreeOfKind".
//*** F) Write a return statement that returns the variable "score".
//***
//***
//*** Your method code goes here.
//***
Trending nowThis is a popular solution!
Step by stepSolved in 3 steps
- I need help with the content on the image below. The Code is Java.arrow_forwardHello! 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: * The code given below is going to be modified based on the instructions in bold. // These are the declared die values.static int die1, die2, die3, die4, die5; public static int calculateFullHouse() {int score;score = 0;boolean isFullHouse;isFullHouse = false; System.out.println("In method calculateFullHouse"); return score;} //*** INSTRUCTIONS FOR CODE FOR YOU TO WRITE//***//*** Modify your "calculateFullHouse" method as follows://*** 1) Remove the System.out.println statement.//***//*** 2) Write an if-statement…arrow_forwardHello! 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 &&…arrow_forward
- First code is top, second code is on bottom. This is for Java. What makes these two codes different? (a) If x = 3, what will the first (code) print out? (b) If x = 3, what will the second (code) print out? (c)If x = 1, what will the first (code) print out? (d) If x = 1, what will the second (code) print out?arrow_forwardHello! 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. Could you also add comments to each line of code when you write out the codes for this as welI? 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: public static void displayScoreSheet() { final String ACES_LABEL = "Aces"; final String TWOS_LABEL = "Twos"; final String THREES_LABEL = "Threes"; final String FOURS_LABEL = "Fours"; final String FIVES_LABEL = "Fives"; final String SIXES_LABEL = "Sixes"; final String THREE_KIND_LABEL = "3 of a kind"; final String FOUR_KIND_LABEL = "4 of a kind"; final String…arrow_forwardWrite a program using java programing language. Write a Java class (called ShowNum) that displays the same number of asterisks (row and columns) as is input in 2 numbers. Your class should have a default constructor (number1 is 0, number2 is 0) and another constructor that inputs 2 numbers (integers). You'll need accessor methods for the numbers and a display method that displays as follows: Input: 2, 7 ******* ******* Demo the class in a client (called ShowNumClient) that allows the user to run the program as many times as they want (enter number and use display method). The user will signal with a sentinel (-1), when they want to terminate the client. Make sure that each number entered in the client is between 1 and 30.arrow_forward
- There are a few errors in this java code: can you fix it please, its basically a debugging exercise: public static int sum(int n){ int n; for (int i=1; i<=n;i--){ sum++; } return sum; } }arrow_forwardPlease help me write a tic tac toe game using java. Please put graphics, a 8x8 grid, a score board, music, a user can verse the computer or someone their friend(button), and please put music. Thank you. For the 8x8 grid the user must make a row of 8 rows horizontally, vertically, and diagonally to win. An write the steps of the program. Requirements are belowarrow_forwardHello, I am working on homework for my computer science class in Java. The assignment is to write code in java that can take an input from the command line, which will be a sentence with improper capitalization. For example "joey DoEsnt Like cAts. HoWeveR She doES." and the code is supposed to fix all the capitalization errors. I am stuck on how to approach this problem.arrow_forward
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education