Skip to content

hans4dev/interactive-anagrams

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Interactive Anagrams

Console application to test and find anagrams.

Features

  • 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.

Installation

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 fatJar

Prerequisites and Dependencies

The 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.

Run Locally

Clone the project.

  git clone git@github.com:hans4dev/interactive-anagrams.git

Go to the project directory.

  cd interactive-anagrams

Install dependencies and build the (Fat) JAR by executing the Gradle tasks build followed by fatJar.

  ./gradlew build fatJar

Start 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.

Running Tests

The unit-tests are written in Spock. To run tests, execute the Gradle task test.

  ./gradlew test

Demo

Screenshot

Documentation

For additional insights please consult the separate Documentation, it covers:

  1. research,
  2. design and
  3. decisions made

About

Console application to test and find anagrams.

Resources

Stars

Watchers

Forks

Packages

No packages published