ArkadiyShevyrov / Anagrams

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Anagrams

Task

Task 1.1 Anagrams Assignment: Write an application that reverses all the words of input text:

Examples:

Each word in the text should be reversed: "abcd efgh" => "dcba hgfe"

All non-letter symbols should stay on the same places: "a1bcd efg!h" => "d1cba hgf!e"

Use only the Latin alphabet to test.

Requirements:

Create an empty Maven project

Start with the implementation of a method that reverses only 1 word at a time.

(Optional) Add Main (Application) class where you can read console input or hard code it to check yourself.

Add a method that splits the string into words and runs the previous method for each word.

Make your compiled jar executable, check with

  1. mvn clean package
  2. java -jar target/.jar

How to launch:

  1. Install maven and java.
  2. Clone the repository.
  3. Run mvn clean package
  4. Run java -jar target/Anagrams-1.0-SNAPSHOT.jar

About


Languages

Language:Java 100.0%