Skip to content

A terminal program that reads, sorts, and processes textual or numeric data according to user arguments

Notifications You must be signed in to change notification settings

SVENTRIPIKAL/Sorting-Tool

Repository files navigation

Sorting-Tool

A terminal program that reads, sorts, and processes textual or numeric data
according to user arguments. The program is able to organize data according
to Natural Lexicographic or Numeric order, as well as by Count Percentages.
Additionally, the program is able to Read from & Write to a specified file
if necessary. Valid options & arguments for the program are as followed,
and in no particular order:

OPTIONS ARGUMENTS
-dataType long, line, word
-sortingType byCount, natural
-inputFile {name_of_file}
-outputFile {name_of_file}

Example

java Sorting-Tool -sortingType natural -dataType long -outputFile newFile.txt

>> 1 -2   333 4
>> 42
>> 1                 1

Total numbers: 7.
Sorted data: -2 1 1 1 4 42 333

Note

When reading & writing files, default filepath is the program parent directory.

Highlights

  • Java Scanner
  • File Read / Write
  • When Expressions
  • Exception Handling
  • Try-Catch Statements
  • Command-Line Arguments
  • Maps, Arrays, Lists, & Sets
  • Lexicographic / Numeric Sorting

Inspiration

Sorting Tool (Kotlin)
Part of the JetBrains Academy: Hyperskill - Kotlin Developer Course