Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Here I have shakespeare.text : Shall I compare thee to a summer's day? Thou art more lovely and more temperate: Rough winds do shake the

image text in transcribed

image text in transcribed

Here I have shakespeare.text :

Shall I compare thee to a summer's day? Thou art more lovely and more temperate: Rough winds do shake the darling buds of May, And summer's lease hath all too short a date; Sometimes too hot the eye of heaven shines, And often is his gold complexion dimm'd; And every fair from fair sometimes declines, By chance or nature's changing course untrimm'd: But thy eternal sumemr shall not fade Nor lose possession of that fair thou ow'st; Nor shall Death brag thou wand'rest in his shade, When in eternal lines to time thou grow'st; So long as men can breathe or eyes can see, So long lives this, and this gives life to thee.

And this is frost.txt:

Two roads diverged in a yellow wood, And sorry I could not travel both And be one traveler, long I stood And looked down one as far as I could To where it bent in the undergrowth; Then took the other, as just as fair, And having perhaps the better claim, Because it was grassy and wanted wear; Though as for that the passing there Had worn them really about the same, And both that morning equally lay In leaves no step had trodden black. Oh, I kept the first for another day! Yet knowing how way leads on to way, I doubted if I should ever come back. I shall be telling this with a sigh Somewhere ages and ages hence: Two roads diverged in a wood, and I- I took the one less traveled by, And that has made all the difference.
1. Event Controlled Loops [2pt] String Statistics- Word processors usually have the ability to tell you how many words and how many lines are in your document. Write a program that asks the user for a name of a text file, and outputs the number of words in the textfile and the number of lines ( whitespaces (no tabs either) between words, only single whitespace. We will count words by reading each entire line in the input file as a String, and then using a new user class, StringStats (see below), to count the words in the String

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Systems An Application Oriented Approach Complete Version

Authors: Michael Kifer, Arthur Bernstein, Richard Lewis

2nd Edition

0321268458, 978-0321268457

More Books

Students also viewed these Databases questions

Question

3. Why are age discrimination issues growing in importance?

Answered: 1 week ago

Question

How many Tables Will Base HCMSs typically have? Why?

Answered: 1 week ago

Question

What is the process of normalization?

Answered: 1 week ago