subject

Your expensive, closed source, text editor is taking up too much resources on your computer. You have set out to create a free, light weight text editor that does all the tasks you require. The text editor will support only a few functions. Your functions will be one of the following

Command Type

Type Space

Command Format

SPACE

Notes

Adds a space character to the end of the character buffer

Back Space

BACK

Deletes the last character in the character buffer. If there are no valid characters to delete the command does nothing.

Type Character

TYPE

Adds a non-whitespace character to the end of the character buffer

Flip

FLIP

Flips the contents of the character buffer. The back becomes the front and vice versa. The command will always flip, even if the buffer is empty.

Undo

UNDO

Undos the last BACK, TYPE, SPACE, FLIP, or REDO command, that has not already been undone. If there are no valid commands to undo the command does nothing.

Redo

REDO

Undos the last effective UNDO command, provided there were no effective BACK, TYPE, SPACE, or FLIP commands following it. If there are no valid commands to undo the command does nothing.

Print

PRINT

Prints the contents of the end of the character buffer up until the last space or the end of the buffer. This command does not effect the REDO and UNDO commands.

Exit

EXIT

The program stops execution

You will make a program that takes in a series of commands and performs the requested print operations.

Input Specification

The input will consist of commands each on their own line. There will be exactly one EXIT command, and the EXIT command is guaranteed to be the last given command. For this problem you can assume that non-white space characters will be upper and lower case letters and digits β€˜0’ through β€˜9’.

Output Specification

For each given print command print the contents of the buffer at the given time on its own separate line. If there is no characters in the buffer or the last character in the buffer is a space, print the text "No word found." on its own line, quotes for clarity. You are guaranteed that the total number of characters printed by the commands will be less than 2,000,000.

in C. Your expensive, closed source, text editor is taking up too much resources on your computer. You have set out to create a free, light weight text editor that does all the tasks you require. The text editor will support only a few functions. Your functions will be one of the following

Command Type

Type Space

Command Format

SPACE

Notes

Adds a space character to the end of the character buffer

Back Space
BACK
Deletes the last character in the character buffer. If there are no valid characters to delete the command does nothing.
Type Character
TYPE
Adds a non-whitespace character to the end of the character buffer
Flip
FLIP
Flips the contents of the character buffer. The back becomes the front and vice versa. The command will always flip, even if the buffer is empty.
Undo
UNDO
Undos the last BACK, TYPE, SPACE, FLIP, or REDO command, that has not already been undone. If there are no valid commands to undo the command does nothing.
Redo
REDO
Undos the last effective UNDO command, provided there were no effective BACK, TYPE, SPACE, or FLIP commands following it. If there are no valid commands to undo the command does nothing.
Print
PRINT
Prints the contents of the end of the character buffer up until the last space or the end of the buffer. This command does not effect the REDO and UNDO commands.

Exit

EXIT

The program stops execution

You will make a program that takes in a series of commands and performs the requested print operations.

Input Specification

The input will consist of commands each on their own line. There will be exactly one EXIT command, and the EXIT command is guaranteed to be the last given command. For this problem you can assume that non-white space characters will be upper and lower case letters and digits β€˜0’ through β€˜9’.

Output Specification

For each given print command print the contents of the buffer at the given time on its own separate line. If there is no characters in the buffer or the last character in the buffer is a space, print the text "No word found." on its own line, quotes for clarity. You are guaranteed that the total number of characters printed by the commands will be less than 2,000,000.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 15:00
Which of the following statements tests if students have a grade of 70 or above, as well as fewer than five absences? a: if(grade > = 70 and daysabsent < = 5): b: if(grade > = 70 or daysabsent < = 5): c: if(grade > 70 and daysabsent < = 5): d: if(grade > 70 or daysabsent < = 5): i took the test the answer is a
Answers: 1
question
Computers and Technology, 22.06.2019 23:30
Creating "smart interfaces" in all sectors of industry, government, and the public arena is one of the fastest growing hct areas. these interfaces model, interpret, and analyze such human characteristics as speech, gesture, and vision. the field of biometrics, in which humans authenticate themselves to machines, is an area of considerable interest to hct practitioners. fingerprint scans are one of the most frequently used biometric options, and this article, biometric student identification: practical solutions for accountability & security in schools, makes a case for the implementation of fingerprint scans in schools. critique the article, and answer the following questions: according to the author, what are the main benefits of adopting fingerprint scans in schools for student identification? according to the author, what are the main drawbacks of adopting fingerprint scans in schools for student identification? do you agree with the author's assessment of the pl
Answers: 2
question
Computers and Technology, 23.06.2019 06:00
What machine listens for http requests to come in to a website’s domain? a. a router b. a browser c. a server d. a uniform resource locator
Answers: 1
question
Computers and Technology, 23.06.2019 13:30
Jace needs to answer a question on square roots to win a quiz. how can he use a spreadsheet to find the square root of 786? a. use the functions round and count b. create a table and chart c. use the function sqrt d. use the function now
Answers: 3
You know the right answer?
Your expensive, closed source, text editor is taking up too much resources on your computer. You hav...
Questions
question
Mathematics, 27.06.2019 03:10
question
Mathematics, 27.06.2019 03:10
question
World Languages, 27.06.2019 03:20
Questions on the website: 13722360