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, 24.06.2019 10:00
When writing a business letter, how many times can you use the same merge field in a document? once once, unless using the address block feature unlimited it will depend on the type of document you choose
Answers: 1
question
Computers and Technology, 24.06.2019 18:10
Most information security incidents will occur because of select one: a. users who do not follow secure computing practices and procedures b. increases in hacker skills and capabilities c. poorly designed network protection software d. increasing sophistication of computer viruses and worms
Answers: 1
question
Computers and Technology, 25.06.2019 00:10
Select the correct answer sarah wants to use a device to input signatures on electronic documents. which input device will be most suitable for her? a digital pen b. laser pen c keyboard d. touchscreen reset next
Answers: 2
question
Computers and Technology, 25.06.2019 04:30
You can fit more raw files on a memory card than the jpeg files? truefalse
Answers: 1
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, 10.03.2021 08:10
question
Chemistry, 10.03.2021 08:10
question
Mathematics, 10.03.2021 08:10
question
Law, 10.03.2021 08:10