Hello, can you correct my codes, into inheritance please i am begging you help me. I badly needed it please. import java.util.*; import java.io.*; public class Main { publicstaticvoid main(String[] args) throws Exception { char guess; // user guess File file = new File("word.txt"); Scanner sc = new Scanner(file); String words[] = sc.nextLine().split(","); Random r1 = new Random(); int value =r1.nextInt(words.length); String phraseSolution = words[value]; StringBuilder phrase = new StringBuilder(""); for(int i=0;i= 1) { validation = true; // if letter was present then if gets triggered, if not then previous validation // of false bypasses this if statement towards the return statemen } return validation; } }
Hello, can you correct my codes, into inheritance please i am begging you help me. I badly needed it please. import java.util.*; import java.io.*; public class Main { publicstaticvoid main(String[] args) throws Exception { char guess; // user guess File file = new File("word.txt"); Scanner sc = new Scanner(file); String words[] = sc.nextLine().split(","); Random r1 = new Random(); int value =r1.nextInt(words.length); String phraseSolution = words[value]; StringBuilder phrase = new StringBuilder(""); for(int i=0;i= 1) { validation = true; // if letter was present then if gets triggered, if not then previous validation // of false bypasses this if statement towards the return statemen } return validation; } }
Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
Related questions
Question
Hello, can you correct my codes, into inheritance please i am begging you help me. I badly needed it please.
import java.util.*;
import java.io.*;
public class Main
{
publicstaticvoid main(String[] args) throws Exception
{
char guess; // user guess
File file = new File("word.txt");
Scanner sc = new Scanner(file);
String words[] = sc.nextLine().split(",");
Random r1 = new Random();
int value =r1.nextInt(words.length);
String phraseSolution = words[value];
StringBuilder phrase = new StringBuilder("");
for(int i=0;i= 1)
{
validation = true; // if letter was present then if gets triggered, if not then previous validation
// of false bypasses this if statement towards the return statemen
}
return validation;
}
}
![8:21 AM O 8
33%
06_Laboratory_Exer.. Q
ASTI
IT1712
Laboratory Exercise
Guessing Game 2
Objective:
At the end of the exercise, the students should be able to:
Create a simple game that exhibits file input and output.
Software Requirements:
Latest version of NetBeans IDE
Java Development Kit (JDK) 8
Procedure:
1. Create a folder named LastName_FirstName (ex. Reyes_Mark) in your local drive.
2. Create a new project named LabExer6A. Set the project location to your own folder.
3. Create a simple guessing game (similar to Hangman or Hangaroo). In this game, the user guesses
a letter and then attempts to guess the word.
4. Create a Notepad file named words.txt which will store any number
5. The Java program shall:
words each written per line.
randomly select a word from the list saved in words.txt;
display a letter in which some of the letters are replaced by ?; for example, ED??A??ON
(for EDUCATION):
place the letter in the correct spot (or spots) in the word each time the user guesses a letter
correctly;
inform the user if the guessed letter is not in the word; and
display a congratulatory message when the entire correct word has been deduced.
*Property of STI
Page 1 of 1
06 Laboratory Exercise 1](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F6b6a3a75-91eb-4f3a-9eb2-e1d0bc862d04%2F00e0fbf0-06e1-4bca-b3f1-a70ae638f6bd%2F9dqpb38_processed.jpeg&w=3840&q=75)
Transcribed Image Text:8:21 AM O 8
33%
06_Laboratory_Exer.. Q
ASTI
IT1712
Laboratory Exercise
Guessing Game 2
Objective:
At the end of the exercise, the students should be able to:
Create a simple game that exhibits file input and output.
Software Requirements:
Latest version of NetBeans IDE
Java Development Kit (JDK) 8
Procedure:
1. Create a folder named LastName_FirstName (ex. Reyes_Mark) in your local drive.
2. Create a new project named LabExer6A. Set the project location to your own folder.
3. Create a simple guessing game (similar to Hangman or Hangaroo). In this game, the user guesses
a letter and then attempts to guess the word.
4. Create a Notepad file named words.txt which will store any number
5. The Java program shall:
words each written per line.
randomly select a word from the list saved in words.txt;
display a letter in which some of the letters are replaced by ?; for example, ED??A??ON
(for EDUCATION):
place the letter in the correct spot (or spots) in the word each time the user guesses a letter
correctly;
inform the user if the guessed letter is not in the word; and
display a congratulatory message when the entire correct word has been deduced.
*Property of STI
Page 1 of 1
06 Laboratory Exercise 1
Expert Solution
![](/static/compass_v2/shared-icons/check-mark.png)
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 5 steps with 3 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
Recommended textbooks for you
![Computer Networking: A Top-Down Approach (7th Edi…](https://www.bartleby.com/isbn_cover_images/9780133594140/9780133594140_smallCoverImage.gif)
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
![Computer Organization and Design MIPS Edition, Fi…](https://www.bartleby.com/isbn_cover_images/9780124077263/9780124077263_smallCoverImage.gif)
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
![Network+ Guide to Networks (MindTap Course List)](https://www.bartleby.com/isbn_cover_images/9781337569330/9781337569330_smallCoverImage.gif)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
![Computer Networking: A Top-Down Approach (7th Edi…](https://www.bartleby.com/isbn_cover_images/9780133594140/9780133594140_smallCoverImage.gif)
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
![Computer Organization and Design MIPS Edition, Fi…](https://www.bartleby.com/isbn_cover_images/9780124077263/9780124077263_smallCoverImage.gif)
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
![Network+ Guide to Networks (MindTap Course List)](https://www.bartleby.com/isbn_cover_images/9781337569330/9781337569330_smallCoverImage.gif)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
![Concepts of Database Management](https://www.bartleby.com/isbn_cover_images/9781337093422/9781337093422_smallCoverImage.gif)
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
![Prelude to Programming](https://www.bartleby.com/isbn_cover_images/9780133750423/9780133750423_smallCoverImage.jpg)
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
![Sc Business Data Communications and Networking, T…](https://www.bartleby.com/isbn_cover_images/9781119368830/9781119368830_smallCoverImage.gif)
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY