Description
User generated content is uploaded by users for the purposes of learning and should be used following Studypool's honor code & terms of service.
Explanation & Answer
Q1)want to write data to a text ...
Completion Status:
100%
Review
Review
Anonymous
Just the thing I needed, saved me a lot of time.
Studypool
4.7
Trustpilot
4.5
Sitejabber
4.4
24/7 Homework Help
Stuck on a homework question? Our verified tutors can answer all questions, from basic math to advanced rocket science!
Most Popular Content
The Game Hurkle Project
The Game HurkleThis week's project is based on the game "Hurkle". There are many variations of this game, and the version ...
The Game Hurkle Project
The Game HurkleThis week's project is based on the game "Hurkle". There are many variations of this game, and the version you will work on for your project is a one-dimensional version of it. The Hurkle is an imaginary creature that hides somewhere in a one-dimensional 1x10 integer game-space. Each time the game is run, the program places the Hurkle at a random position (0 through 10) in the game-and the player has a maximum of three (3) guesses to guess the Hurkle s location. The Hurkle does not move during the game. If the player finds the Hurkle, the program reports success and ends. If the player does not find the Hurkle the program gives a hint about what direction to move to find the Hurkle. There are two possible hints: right, or left.The given version of the program is a console-based version (meaning the inputs and outputs happen on the console display). Run this code for the game Hurkle to see how it executes. It works well in the console but your job is to convert it for running in SWING with more graphical feedback for the user.You job is to experiment with the given code, and then adapt it by incorporating SWING features, such that the inputs and outputs will be more GUI-oriented, rather than console oriented. We've used SWING features in several programs already (in the lectures) and earlier project assignments, so you may want to review your textbook reading and the code examples in the week that use SWING.Have fun, and don't hesitate to ask questions.import java.util.Random;import java.util.Scanner;publicclass Hurkle{ publicstaticvoid main(String[] args) { // TODO Auto-generated method stub // gets user input for the keyboard Scanner input = new Scanner(System.in); //Gets a random number between 0 and 1 Random ran = newRandom(); //variable to hold the users' guess int usersAnswer; finalint LIMIT = 10; //variable to hold the system random number int rGuess; rGuess = ran.nextInt(LIMIT); // Here we are creating an array of one character strings into a String variable named 'display' String[] display ={"0","1","2","3","4","5","6","7","8","9","10"}; System.out.println("You get 3 tries to win!"); // Tell the user how many tries they will get for(int tries = 0; tries < 3; tries++) { //ask the user for a guess System.out.println("What is your number guess?" + '\n'); //using the scanner class, get the user guess usersAnswer = input.nextInt(); if(usersAnswer == rGuess){ System.out.print("Bingo, you win!" + '\n'); tries = 9999; // 9999 is used because it is so far out of bounds it has to get out of the game } else if (usersAnswer < rGuess){ display[usersAnswer] = ">"; // replace the user guessed number with feedback: greater than, this is saving the feedback } else{ // so it doesn't get lost for the user display[usersAnswer ] = "<"; // replace the user guessed number with feedback: less than } // Display the number line with feedback System.out.print("Feedback : "); for(int i=0;i<display.length;i++){ System.out.print( display[i] + " " ); } } // end of for loop for the game System.out.println('\n'); System.out.println( "Game Over, 3 tries you lose! The number was " + rGuess); // 3 tries you lose }}Submission Details:Embed the two programs in a Microsoft Word document with a description of your programming strategy.Name your document
AD 616 Boston University Rstudio Problem & Enterprise Risk Analytics Exercises
Problem solving using RstudioProblem solving using RstudioProblem solving using Rstudio metad616_assignment3_tutorial_p01. ...
AD 616 Boston University Rstudio Problem & Enterprise Risk Analytics Exercises
Problem solving using RstudioProblem solving using RstudioProblem solving using Rstudio metad616_assignment3_tutorial_p01.mp4metad616_assignment3_tutorial_p02.mp4
ISSC 366 American Military TLS SSL and IPsec Virtual Private Networks Essay
Assignment Instructions:1. Two
of the main VPN encryption protocols are TLS/SSL and IPSEC. Both
protocols estab ...
ISSC 366 American Military TLS SSL and IPsec Virtual Private Networks Essay
Assignment Instructions:1. Two
of the main VPN encryption protocols are TLS/SSL and IPSEC. Both
protocols establish handshakes to exchange parameters which will be used
to set up VPN connections. In this paper you will first describe the
TLS/SSL VPN handshake followed by a the IPSEC handshake. Compare the
two protocols and explain, according to you which one is better. 1 page, APA format.
10 pages
Managing Software Development 2
Acceptance testing is an extension of system testing. Once the testing team has a feeling that the product is ready for th ...
Managing Software Development 2
Acceptance testing is an extension of system testing. Once the testing team has a feeling that the product is ready for the users or customers, they ...
Similar Content
python code , Complete Programming Essentials Assignment help
Exception HandlingYou decide to upload your recent project to a programming community website for feedback, and one thing ...
University of Maryland Baltimore Cloud Computing Adoption Essay
1.The CTO will be reviewing this document. You have shown how easy it is to provision a Microsoft Windows desktop us...
Texas University Largest Sum Subarray Java Coding Task
Overview: You’ll be given an array of (positive and negative) integers with size N. For any pair 1 ≤ i ≤ j ≤ N it ...
BUS 235C Data Mining Using R for Data Analysis and Graphics Worksheet
BUS 235C Data Mining
Homework 2
1. The three airfares files have data about the fares charged on different routes. The
air...
lab 9 web
i put some linclk to save some time use this HTML for an unformatted table to save some time (( file:///C:/Users/Q/Downlo...
Python Question
Language: Python
Construct your own K-nearest neighbour classifier (with continuous inputs)-it is expected to perform the ...
Rental1 2
The following assumptions have been made in the making of the rental_db database: The database serves as a backend for a w...
Wd2016 Challengeyourself 2 3 1
It is sometimes easy to forget basic safety strategy when we live in a secure community like Spring Hills. Outside our gat...
Project Report Submission
Random Forest is an ensemble tree-based machine learning algorithm. Ensemble algorithms combine more than one algorithm of...
Related Tags
Book Guides
Dr Jekyll And Mr Hyde
by Robert Louis Stevenson
Narrative of the Life of Frederick Douglass
by Frederick Douglass
The Red Badge of Courage
by Stephen Crane
Good Kids Bad City
by Kyle Swenson
Hiroshima
by John Hersey
The Eyes Were Watching God
by Zora Neale Hurston
No Exit
by Taylor Adams
The Restless Wave
by John McCain
The Woman in the Window
by A. J. Finn
Get 24/7
Homework help
Our tutors provide high quality explanations & answers.
Post question
Most Popular Content
The Game Hurkle Project
The Game HurkleThis week's project is based on the game "Hurkle". There are many variations of this game, and the version ...
The Game Hurkle Project
The Game HurkleThis week's project is based on the game "Hurkle". There are many variations of this game, and the version you will work on for your project is a one-dimensional version of it. The Hurkle is an imaginary creature that hides somewhere in a one-dimensional 1x10 integer game-space. Each time the game is run, the program places the Hurkle at a random position (0 through 10) in the game-and the player has a maximum of three (3) guesses to guess the Hurkle s location. The Hurkle does not move during the game. If the player finds the Hurkle, the program reports success and ends. If the player does not find the Hurkle the program gives a hint about what direction to move to find the Hurkle. There are two possible hints: right, or left.The given version of the program is a console-based version (meaning the inputs and outputs happen on the console display). Run this code for the game Hurkle to see how it executes. It works well in the console but your job is to convert it for running in SWING with more graphical feedback for the user.You job is to experiment with the given code, and then adapt it by incorporating SWING features, such that the inputs and outputs will be more GUI-oriented, rather than console oriented. We've used SWING features in several programs already (in the lectures) and earlier project assignments, so you may want to review your textbook reading and the code examples in the week that use SWING.Have fun, and don't hesitate to ask questions.import java.util.Random;import java.util.Scanner;publicclass Hurkle{ publicstaticvoid main(String[] args) { // TODO Auto-generated method stub // gets user input for the keyboard Scanner input = new Scanner(System.in); //Gets a random number between 0 and 1 Random ran = newRandom(); //variable to hold the users' guess int usersAnswer; finalint LIMIT = 10; //variable to hold the system random number int rGuess; rGuess = ran.nextInt(LIMIT); // Here we are creating an array of one character strings into a String variable named 'display' String[] display ={"0","1","2","3","4","5","6","7","8","9","10"}; System.out.println("You get 3 tries to win!"); // Tell the user how many tries they will get for(int tries = 0; tries < 3; tries++) { //ask the user for a guess System.out.println("What is your number guess?" + '\n'); //using the scanner class, get the user guess usersAnswer = input.nextInt(); if(usersAnswer == rGuess){ System.out.print("Bingo, you win!" + '\n'); tries = 9999; // 9999 is used because it is so far out of bounds it has to get out of the game } else if (usersAnswer < rGuess){ display[usersAnswer] = ">"; // replace the user guessed number with feedback: greater than, this is saving the feedback } else{ // so it doesn't get lost for the user display[usersAnswer ] = "<"; // replace the user guessed number with feedback: less than } // Display the number line with feedback System.out.print("Feedback : "); for(int i=0;i<display.length;i++){ System.out.print( display[i] + " " ); } } // end of for loop for the game System.out.println('\n'); System.out.println( "Game Over, 3 tries you lose! The number was " + rGuess); // 3 tries you lose }}Submission Details:Embed the two programs in a Microsoft Word document with a description of your programming strategy.Name your document
AD 616 Boston University Rstudio Problem & Enterprise Risk Analytics Exercises
Problem solving using RstudioProblem solving using RstudioProblem solving using Rstudio metad616_assignment3_tutorial_p01. ...
AD 616 Boston University Rstudio Problem & Enterprise Risk Analytics Exercises
Problem solving using RstudioProblem solving using RstudioProblem solving using Rstudio metad616_assignment3_tutorial_p01.mp4metad616_assignment3_tutorial_p02.mp4
ISSC 366 American Military TLS SSL and IPsec Virtual Private Networks Essay
Assignment Instructions:1. Two
of the main VPN encryption protocols are TLS/SSL and IPSEC. Both
protocols estab ...
ISSC 366 American Military TLS SSL and IPsec Virtual Private Networks Essay
Assignment Instructions:1. Two
of the main VPN encryption protocols are TLS/SSL and IPSEC. Both
protocols establish handshakes to exchange parameters which will be used
to set up VPN connections. In this paper you will first describe the
TLS/SSL VPN handshake followed by a the IPSEC handshake. Compare the
two protocols and explain, according to you which one is better. 1 page, APA format.
10 pages
Managing Software Development 2
Acceptance testing is an extension of system testing. Once the testing team has a feeling that the product is ready for th ...
Managing Software Development 2
Acceptance testing is an extension of system testing. Once the testing team has a feeling that the product is ready for the users or customers, they ...
Earn money selling
your Study Documents