AVA (for the most part, I don't know how to add random words from the txt. files to the angle brackets. The rest below is the original assignment followed by example)

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

JAVA (for the most part, I don't know how to add random words from the txt. files to the angle brackets. The rest below is the original assignment followed by example)

 

This program generates random stories using wordlists you

supply. It starts from a base story that contains place-

holders, which appear in <angle brackets>. The allowed

placeholders are singnoun, plunoun, singverb, pluverb,

pastverb, adj, and adv. The base stories come from files

named story#.txt, where # would be replaced by 1, 2, etc.

Substituting for the placeholders would be words that come

from wordlists. The wordlists must be named noun.txt (for

singular nouns), nouns.txt (for plural nouns), verb.txt

(for singular verbs), verbs.txt (for plural verbs),

verbed.txt (for past-tense verbs), adj.txt (for adjectives)

and adv.txt (for adverbs). All these files - the story files

and the word lists, must be located in the same folder. You

will begin by selecting a story number, and then I'll take

it from there, generating a random story for you to enjoy.

 

Enter a story number, i to see instructions, or q to quit: 1

 

Here is your Madlib!

 

There was once a moist tiger who screamed in a mouse.

Everyone in the peasant was lopsided of the rickety house,

but no one had the locusts to love. So we testily cried

past the dog and praised upon the downtrodden feelings,

and everyone felt dark about their lot in life, until, of course,

the feelings descended upon us like voices and took destiny

from us. Rue that day! Rue it exuberantly.

 

txt file story

There was once a <adj> <singnoun> who <pastverb> in a <singnoun>.
Everyone in the <singnoun> was <adj> of the <adj> <singnoun>,
but no one had the <plunoun> to <pluverb>. So we <adv> <pastverb>
past the <singnoun> and <pastverb> upon the <adj> <plunoun>,
and everyone felt <adj> about their lot in life, until, of course,
the <plunoun> descended upon us like <plunoun> and took <singnoun>
from us. Rue that day! Rue it <adv>.

 

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps with 4 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