Initial commit

Includes:
- cpp part
- java part with a sample main