Console application to test and find anagrams.
- Text-based UI
- Test if two entered texts are anagrams
- Record a history of text inputs during runtime
- Find matching anagrams within the history for an entered text
The implementation of these features can be used to demonstrate basic Java development skills.
There are two ways to install the executable Java archive (Fat JAR), either download or build from the sources.
(a) Install by downloading the released JAR file, e.g. by using wget or the curl command.
curl -O "https://github.com/hans4dev/interactive-anagrams/releases/download/$version/interactive-anagrams-$version.jar"Where $version needs to be set or replaced with the desired version, like 0.0.1.
(b) Install by cloning the repository and building from the sources. Use Gradle tasks build and fatJar for packaging.
git clone git@github.com:hans4dev/interactive-anagrams.git
cd interactive-anagrams
./gradlew build fatJarThe prerequisites to install and run the application are:
- a terminal, preferably with ANSI color support
- Java 8+ to build and execute
- Git client to clone the repository
Other languages, tools and libraries used:
- Gradle - build tool (in the Groovy syntax) to build and package.
- Spock - specification and testing framework (also Groovy) for implementing tests with readable specifications (in BDD style).
- ConsoleUI - library for simple UI elements on ANSI console based terminals, by Andreas Wegmann.
Clone the project.
git clone git@github.com:hans4dev/interactive-anagrams.gitGo to the project directory.
cd interactive-anagramsInstall dependencies and build the (Fat) JAR by executing the Gradle tasks build followed by fatJar.
./gradlew build fatJarStart the console-application directly from the JAR in your favourite terminal, optionally with ANSI color support. Therefor use the -jar option of the java command.
java -jar "interactive-anagrams-$version.jar"Where $version needs to be set or replaced with the current version, like 0.0.1.
The unit-tests are written in Spock.
To run tests, execute the Gradle task test.
./gradlew testFor additional insights please consult the separate Documentation, it covers:
- research,
- design and
- decisions made
