Create a class called Hurkel with a public static void main method to begin execution Display a number line 0 to 10 Get a random number Get a guess from the user Compare the userGuess to the Random number If they match announce Winner! If not tell the user if their guess is higher or lower than the random number Check to see how many times the User has guessed, limit guesses to 3 If not 3 then Compare the userGuess to the Random number If they match announce Winner! If not tell the user if their guess is higher or lower than the random number Check to see how many times the User has guessed, limit guesses to 3 until there is a match or the user has guessed 3 times.

Question

Create a class called Hurkel with a public static void main method to begin execution
Display a number line 0 to 10
Get a random number
Get a guess from the user
Compare the userGuess to the Random number
If they match announce Winner!
If not tell the user if their guess is higher or lower than the random number
Check to see how many times the User has guessed, limit guesses to 3
If not 3 then
Compare the userGuess to the Random number
If they match announce Winner!
If not tell the user if their guess is higher or lower than the random number
Check to see how many times the User has guessed, limit guesses to 3
until there is a match or the user has guessed 3 times.

Expert Answer

Want to see the step-by-step answer?

Check out a sample Q&A here.

Want to see this answer and more?

Experts are waiting 24/7 to provide step-by-step solutions in as fast as 30 minutes!*

*Response times may vary by subject and question complexity. Median response time is 34 minutes for paid subscribers and may be longer for promotional offers.
Tagged in
Engineering
Computer Science

Java

Related Computer Science Q&A

Find answers to questions asked by students like you.

Q: A drawing environment in which menus, toolbars, pallets, and ribbon panels are displayed for a speci...

A: Explanation: Workplace is a collection of menus, toolbars, pallets and ribbon panels. It results in...

Q: Assess the benefits of agile development over conventional formalisedmethodologies.

A: The benefits of agile development over conventional formalized methodologies: Concentrates on Users...

Q: 1. The compound proposition p ^ (p V q) is logically equivalent to а) р b) q с) р Vq d) р^9

A: Introduction of Propositional Logic Propositional logic, also known as statement logic, is the branc...

Q: Find the area bounded by the two curves; i. y=x+x-10 and y =-x +5x+6

A: To find the area bounded by two curves, you need to find the point of intersection of the two curves...

Q: A new PKI is being built at a company, but the network administrator has concerns about spikes of tr...

A: CRL

Q: Rewrite the following Python code using for loop. count = 100 while count >= 0:     print (count)...

A: The required python code is given below:

Q: a) List the balance factor for each Node in the BST. b) is the BST balanced or not? Why? 5 4 6 3 7

A: The balance factor of each node is defined as the difference between the number of nodes in the left...

Q: Please circle True or False for each of the following statements. C++ Local variables used in a func...

A: A variable is a storage location which hold the value. The variables can be accessed throughout the ...

Q: Please put that language as Java

A: 1)Program:-   import java.util.*;public class HelloWorld{      public static void main(String []args...

Q: Q4. In this class we use Python, which we haven't actually learned and Jupyter notebooks. PLEASE inc...

A: Idea is here that we have to make a guess for the form of the solution and prove by induction.  Let...

Q: Explain the different definitions of terrorism

A: THE DEFINITION O TERRORISM -- The definitions of terrorism are usually  controversial and complex, a...

Q: How to Use/Re-Use a Variable Explain how many variables to set up in order to solve a problem in the...

A: As you have not specified the lab problem or the language of programming. I will share how to re-use...

Q: Write pseudocode for each example (a through e) in Exercise 2, making sure your pseudocode is struct...

A: From the above flowcharts  a) consider the modified flowchart a) Pseudo code of the flowchart: perfo...

Q: Write code to read the content of the text file input.txt .● For each line in input.txt , write a ne...

A: Note: Programming language is missing in the question. So we will answer this program in Python lang...

Q: C++ - When analyzing data sets, such as data for human heights or for human weights, a common step...

A: Step 1:- Program Approach:- (i)Declare one header file (ii)Declare 3 variable of type integer (iii)A...

Q: Course : Big Data Processing Material : BIG DATA LAYER ARCHITECTURE   Question: In general, What is ...

A: Big data Architecture:-                     Big data architecture is the foundation for big data ana...

Q: Review the IBM history. Describe three distinct phases the company has gone through in reaction to c...

A: Review of the history of the IBM is given below: The full form of the IBM is “International Business...

Q: Using the Web, find out more about Kevin Mitnick. What did he do? Who caught him? Write a short summ...

A: Actually, about his given below:

Q: When is it advantageous to use a DO loop rather than other kinds of loops? What are some examples of...

A: Do loop executes at least once before testing the condition. It is an exit control loop. To control ...

Q: Consider the following three possible events that may be highlighted on SOC dashboards:a) A signific...

A: Step 1Answer a) i): A significant and unusual increase in the number of ARP responses on an internal...

Q: Scaling. On the consumer side, your website sees an ever-expanding demand, in part from the surge in...

A: SCALING IN ONLINE PURCHASING: Scaling in online purchasing refers to handling the growing amount of...

Q: The language is java. The chapter this code is in is about branching

A: // Import the packageimport java.util.Scanner; // Create LabProgram Classpublic class Main{    // Cr...

Q: Oscar has invested a huge amount of money into the stock market and doesn't trust just anyone to giv...

A: Truth Table: Given three variables p, m and z where p=Pain Webster, m=Meg A. Cash and z=LaZora. As ...

Q: Write a program that reads a text and outputs the letters, together with their counts, as explained ...

A: Program code: #include <iostream> #include <fstream> using namespace std; // Create a s...

Q: Task 4. Consider the following algorithm to generate a sequence of numbers: Start with a random inte...

A: As mentioned in the question, in this algorithm sequence of numbers would be generated, and to start...

Q: Using python, Write a program that displays a table of inches from 1-12 and equivalent lengths in ce...

A: Program description: Python program that displays a conversion table of inches to corresponding cent...

Q: For each of these sentences, determine whether an inclusive OR, or an exclusive OR, is intended. Exp...

A: Correct answer is - a) Inclusive orb) Inclusive orc) Exclusive or a) Experience with C++ or java is ...

Q: Please fill in the blanks for the following statements: To define a class use the keyword _________...

A: Actually , to define a class use the keyword class...followed by a class name, followed by a pair f ...

Q: Thank you

A: EXPLANATION: - Main operations involved: - Reading the sorted text data file. Splitting the data ba...

Q: Computer Representation: Consider the bit string representation of sets A and B: (info in photo) Ple...

A: Step 1:- Note:-I have given the solution of both the parts. Introduction:- A= {paul, george} B= {rin...

Q: Study the adapter structure in the diagram below and then answer the questions that follow. Using su...

A: NETWORK ADAPTER -- A network adapter is a component of a computer's internal hardware that is used t...

Q: First you should ask for the number of tasks to perform.   Then you should create a list of tasks wi...

A: Program description: The python program is to prompt the user to enter the number of tasks to comple...

Q: Explain why sniffing and wiretapping are categorizes as passive threats

A: PASSIVE ATTACK - Passive attack is kind of unusual attacks are a type of attack where, the attacker ...

Q: User: Make a class called User. Create two attributes called first_name and last_name, and then crea...

A: Hey, since there are multiple questions posted, we will answer the first question. If you want any s...

Q: In this lab the completed program should print the numbers 0 through 10, along with their values mul...

A: Solution: The detailed loop function ()contains  a for loop  for printing the values from 0 to 10 al...

Q: IN PYTHON PLEASE   Write a function named translate that receives a day of the week ("Monday", "Tues...

A: Below is the required Python program: - Approach: - Define the function that takes two lists of day...

Q: Search the Web for" The Official Phreakers Manual." What information in this manual might help a sec...

A: Phreaker's  Manual:- In the late 1950s, this phenomenon first came into view where phreaks could ea...

Q: Based on the code below, intScores(3, 1) is initialized to ____. ​ Dim intScores(,) As Integer = {{7...

A: An array is a collection of elements that have same name and datatype, and we can access the values ...

Q: A marketing company would like to know if varsity (college) swimmers are (on average) tallerthan the...

A: Given: According to the given link in the question the male swimming team with their height are as f...

Q: ) Describe how you can use this log data to determine users who consistently seek the lowest price?

A: Mention the use of this log data to determine users who consistently seek lowest price: After summ...

Q: Design a console application that will print the fine due for a citizen who was caught speeding in a...

A: /** Java program that prompts the user to enter name and speed* and then create an instance of the S...

Q: Assume a linked list contains following integers: 7, 2, 9, 5, 8, 3, 15 and the pointer head is point...

A: Given statements: Node<int> *curNode=head; Node<int> *aNode; int s; while(curNode!=NULL)...

Q: Please circle True or False for each of the following statements. C++ You can create multiple instan...

A: C++ is an Object oriented programming language. In an Object oriented programming, everything is exp...

Q: using c++

A: Algorithm is a set of instructions in solving a problem and the instructions are as follows: start ...

Q: use python

A: Program description: Python program that prompts user to enter n value for the number of iterations ...