gruppe06-hufflepuff-projekt.../README.md

3.6 KiB

Texteditor

Texteditor is a program to edit a text by using the input and is then able to output it as desired via the console. This program has been programmed in Java.

Usermanual

Because the program has a command line interface, the user has to work with commands in order to work with the program.

The user has to use the following commands in order to interact with the program and to execute the actions of each command:

ADD

ADD Adds a paragraph with custom text.

Enter the command add to add a new paragraph at the end of text. After submitting the add command you will be prompted to enter the text to add as last paragraph.

ADD [n] Adds a paragraph with custom text at a specific position in text.

Enter the command add with the paragraph number where it should be added. After submitting the add [n] command you will be prompted to enter the text to add in the corresponding paragraph.

DUMMY

DUMMY Inserts a paragraph with dummy text at the end of the text.

Enter the command dummy to enter a pre-written paragraph into the text as your last paragraph.

DUMMY [n] Inserts a paragraph with dummy text at a specific position.

Enter the command dummy with a paragraph number to insert a pre-written dummy text paragraph to a spcific position.

REPLACE

REPLACE Replaces desired words in the last paragraph with a desired replacement.

Enter the command replace, after submitting the command replace enter the characters that should be replaced. After submitting the characters you will be need to input the characters wich will replace the previous characters.

REPLACE [n] Replaces desired words in the chosen paragraph [n] text with a desired replacement.

Enter the command replace with a desired paragraph where the characters should be replaced, after submitting the command replace enter the characters that should be replaced. After submitting the characters you will be need to input the characters wich will replace the previous characters.

DELETE

DEL Deletes the last paragraph.

Enter the command del to delete the last paragraph.

DEL [n] Deletes the selected paragraph.

Enter the command del with a paragraph number, the corresponding paragraph will then be deleted.

INDEX

INDEX Diplays the index of words used 3 times or more.

Enter the command index to display the words that are displayed more than three times in the text with their corresponding paragraphs.

PRINT

PRINT Prints the text with the previously set format option.

Enter the command print to print out the current text you have. The Text will be printed with the settings set before (see FORMAT the Text). If no settings have been set the standard to output is the FIX format and a line length of 20.

FORMAT

FORMAT RAW Sets the format to raw.

Enter the command format raw to change the print format to raw. After you changed the format to raw you can use the command PRINT again and each paragraph will be printed on one line with its corresponding paragraph number.

FORMAT FIX [n] Sets the format fix with the maximum line length.

Enter the command format fix and the max line length which will be used. After you changed the format to fix you can use the command PRINT again and the text will be displayed with the max length in mind and a new line will be created if no space is left for a paragraph. If a word is too long to fit the line length, it will be displayed as whole, ignoring the max length.

Class diagramm

Classdiagramm of this program