Programmieren-2-Kontaktdate.../README.md

59 lines
1.9 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Programmieren 2 Contact-DB
## Compile
1. Compile project:
```shell
javac -sourcepath src -d build $(find src -path src/de/dhbw/unit -prune -false -o -name *.java)
```
2. Copy resources:
```shell
mkdir build/de/dhbw/contactdb/db && cp src/de/dhbw/contactdb/db/contacts2021.db build/de/dhbw/contactdb/db/contacts2021.db
```
## Tests
1. Tests by Johannes Unterstein
```shell
java -cp build/ de.dhbw.contactdb.ProjectTest.ProjektTester
```
2. Unittests
Tests are included in de.dhbw.unit.ProjectTest
The easiest way to run them is by using IntelliJ or any other IDE.
## Usage
After compiling (and testing) you can use this tool. The available functions are listed below:
1. Search for persons:
```shell
> java -cp build/ de.dhbw.contactdb.Main --personensuche="Ila"
Mila Milan
```
3. Search for places:
```shell
> java -cp build/ de.dhbw.contactdb.Main --ortssuche="Markt"
Supermarkt Großmarkt
```
4. Find contact persons:
```shell
> java -cp build/ de.dhbw.contactdb.Main --kontaktpersonen=1
Aaron, Amelie, Ben, Emil, Emilia, Emily, Felix, Hannah, Hannes, Julius, Leonard, Levi, Louis, Malia, Marlene, Ole, Rosalie, Sophia, Victoria
```
4. Find visitors:
```shell
> java -cp build/ de.dhbw.contactdb.Main --besucher=1,"2021-05-15T14:16:00"
Adam, Amelie, Carla, Carlotta, Charlotte, Elli, Emil, Emilia, Emily, Emma, Eva, Fiona, Hannah, Hannes, Jonah, Jonas, Joshua, Konstantin, Lian, Lisa, Luisa, Malia, Mara, Maria, Mattis, Max, Melina, Mia, Mohammed, Noah, Ole, Sophia, Tim, Tom, Toni, Victoria
```
## Docs
If you want to understand this code, you can use the UML diagram or the javadoc.
### Javadoc
Navigate into the `docs` directory and open `index.html` in your preferred browser.
### UML
The uml diagram is located in the `uml` directory. The `*.drawio` file can be shown or edited with [draw.io](https://draw.io).