Question: In text-editing and word-processing applications, one formatting conversion sometimes used to indicate that a piece of text is a footnote or an endnote is to

In text-editing and word-processing applications, one formatting conversion sometimes used to indicate that a piece of text is a footnote or an endnote is to mark it with some special delimiters such as { and }. When the text is formatted for output, these notes are not printed as a normal text but are stored in a queue for later output. Write a program that reads a document containing endnotes indicated in this manner, collect them in a queue and print them at the end of the document.

Here are the file samples:

Frost.txt

Stopping By Woods on a Snowy Evening

by Robert Frost {An American poet; 26 March 1874 - January 1963}

Whose woods these are I think I know.

His house is in the village though;

He will not see me stopping here {He's not really referring to stopping in the woods, he's referring to death}

To watch his woods fill up with snow.

My little horse must think it queer

To stop without a farmhouse near

Between {No hope in his present situation} the woods and frozen lake

The darkest evening of the year. {The subject is experiencing harsh times and difficulty.}

He gives his harness bells a shake {The horse is restless}

To ask if there is some mistake. {This person's enjoyment of the solitude and the lonliness of the woods is not quite complete because of the horse that is restless at the stop -- a reality check.}

The only other sound's the sweep

Of easy wind and downy flake.

The woods are lovely, dark and deep.

But I have promises to keep,

And miles to go before I sleep,

And miles to go before I sleep. {The subject is tired and wishes he could just lie down and sleep, but he has many things to do first.}

OutFrost.txt

Stopping By Woods on a Snowy Evening

by Robert Frost [1]

Whose woods these are I think I know.

His house is in the village though;

He will not see me stopping here [2]

To watch his woods fill up with snow.

My little horse must think it queer

To stop without a farmhouse near

Between [3] the woods and frozen lake

The darkest evening of the year. [4]

He gives his harness bells a shake [5]

To ask if there is some mistake. [6]

The only other sound's the sweep

Of easy wind and downy flake.

The woods are lovely, dark and deep.

But I have promises to keep,

And miles to go before I sleep,

And miles to go before I sleep. [7]

EndNotes:

[1] An American poet; 26 March 1874 - January 1963

[2] He's not really referring to stopping in the woods, he's referring to death

[3] No hope in his present situation

[4] The subject is experiencing harsh times and difficulty.

[5] The horse is restless

[6] This person's enjoyment of the solitude and the loneliness of the woods is not quite complete because of the horse that is restless at the stop -- a reality check.

[7] The subject is tired and wishes he could just lie down and sleep, but he has many things to do first.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!