Hello, can you correct my codes, into inheritance please i am begging you help me. I badly needed it please 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 of words each written per line. 5. The Java program shall: • 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. Here's my code import java.util.*; import java.io.*; public class Main { public static void main(String[] args) throws Exception { char guess; File file = new File("word.txt"); Scanner input = new Scanner(file); String words[] = input.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; } 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...
icon
Related questions
Question
Hello, can you correct my codes, into inheritance please i am begging you help me. I badly needed it please 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 of words each written per line. 5. The Java program shall: • 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. Here's my code import java.util.*; import java.io.*; public class Main { public static void main(String[] args) throws Exception { char guess; File file = new File("word.txt"); Scanner input = new Scanner(file); String words[] = input.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; } 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
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
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
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…
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)
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
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY