Write an application named, Lab14.java. This application will do the following:

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

Write an application named, Lab14.java. This application will do the following:
1. Display an introductory message
2. Choose a random word from the file, wordlist.txt, and display it
3. Disguise the selected word, and display it
4. Ask the user whether to continue, i.e., whether to repeat steps 2, 3, and 4, or quit the application
Once the user chooses to stop the application:
5. Display the total number of vowels hidden
6. Display the total number of consonants hidden
7. Display termination message
The user will be asked whether to continue playing and will indicate that another game is to be played by answering
‘y’ or ‘Y’ in response to the question, “Want to play again?” asked by the program after displaying each chosen word
and its disguised version. If the user’s response is any character other than ‘y’ or ‘Y’, the totals are displayed and then
the application termination message is displayed. See examples below.
About randomly choosing a word from the file, wordlist.txt, found on Canvas under this assignment:
This file contains 33,736 words. You may use this numeric value (33736) as a named constant and use this constant
in generating a random integer. You must use the Random class to do this. Then, read each word from the beginning
of the file until you read the nth word, where n is the random number generated between 1 and 33,736, inclusive. For
example, if the random number is 20,751, your code should read and ignore 20,750 words, then read the word,
nonfat, as the secret word (number 20751). [NOTE: DO NOT USE ARRAYS!]
Disguising a word: Once a word is chosen randomly, the program displays this word and the word’s disguise to the
user. The disguised word MUST contain a dash (‘-‘) in the corresponding position of each consonant in the chosen
word and an equal sign (‘=’) for each vowel. See the example output below. Note: The letter, Y, is considered a
consonant for this application.
DESIGN REQUIREM

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 1 images

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