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

84 lines
3.6 KiB
Markdown
Raw Permalink Normal View History

# 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```
2021-11-12 15:15:38 +01:00
Adds a paragraph with custom text.<br/> <br/>
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]```
2021-11-12 15:15:38 +01:00
Adds a paragraph with custom text at a specific position in text.<br/> <br/>
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```
2021-11-12 15:15:38 +01:00
Inserts a paragraph with dummy text at the end of the text.<br/> <br/>
2021-11-12 10:54:37 +01:00
Enter the command dummy to enter a pre-written paragraph into the text as your last paragraph.
```DUMMY [n]```
2021-11-12 15:15:38 +01:00
Inserts a paragraph with dummy text at a specific position.<br/> <br/>
Enter the command dummy with a paragraph number to insert a pre-written dummy text paragraph to a spcific position.
### REPLACE
```REPLACE```
2021-11-12 15:15:38 +01:00
Replaces desired words in the last paragraph with a desired replacement.<br/> <br/>
2021-11-12 10:54:37 +01:00
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]```
2021-11-12 10:54:37 +01:00
Replaces desired words in the chosen paragraph [n] text with a desired replacement.<br/> <br/>
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```
2021-11-12 10:54:37 +01:00
Deletes the last paragraph.<br/> <br/>
Enter the command del to delete the last paragraph.
```DEL [n]```
2021-11-12 10:54:37 +01:00
Deletes the selected paragraph.<br/> <br/>
Enter the command del with a paragraph number, the corresponding paragraph will then be deleted.
2021-11-12 10:37:38 +01:00
### INDEX
2021-11-12 09:51:37 +01:00
```INDEX```
2021-11-12 10:54:37 +01:00
Diplays the index of words used 3 times or more.<br/> <br/>
2021-11-12 15:15:38 +01:00
Enter the command index to display the words that are displayed more than three times in the text with their corresponding paragraphs.
2021-11-12 10:37:38 +01:00
### PRINT
```PRINT```
2021-11-12 10:54:37 +01:00
Prints the text with the previously set format option.<br/> <br/>
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).
2021-11-12 15:15:38 +01:00
If no settings have been set the standard to output is the FIX format and a line length of 20.
### FORMAT
2021-11-12 09:51:37 +01:00
```FORMAT RAW```
2021-11-12 10:54:37 +01:00
Sets the format to raw.<br/> <br/>
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
2021-11-12 10:54:37 +01:00
and each paragraph will be printed on one line with its corresponding paragraph number.
2021-11-12 09:51:37 +01:00
```FORMAT FIX [n]```
2021-11-12 10:54:37 +01:00
Sets the format fix with the maximum line length.<br/> <br/>
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.
2021-11-12 10:54:37 +01:00
## Class diagramm
2021-11-12 18:06:35 +01:00
![Classdiagramm of this program](docs/PM2_ClassDiagram.drawio.svg)
2021-11-12 18:06:35 +01:00