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, 23.06.2019 08:30
Based on your knowledge of a good network, describe what you think is a perfect network would be. what kind of information and resources could users share on this network. what would the network administrator do? what kind of communication would be used?
Answers: 1
question
Computers and Technology, 24.06.2019 11:00
The program below has been generalized to read a user's input value for hourlywage. run the program. notice the user's input value of 10 is used. modify that input value, and run again. generalize the program to get user input values for workhoursperweek and workweeksperyear (change those variables' initializations to 0). run the program. monthsperyear will never change, so define that variable as final. use the standard for naming final variables. ex: final int max_length
Answers: 2
question
Computers and Technology, 24.06.2019 13:00
Which best describes the condition under which the unicode output is the same as plain text ?
Answers: 1
question
Computers and Technology, 24.06.2019 14:00
In simple terms, how would you define a protocol?
Answers: 2
You know the right answer?
Your expensive, closed source, text editor is taking up too much resources on your computer. You hav...
Questions
question
Biology, 21.07.2019 12:30
question
Health, 21.07.2019 12:30
Questions on the website: 13722363