having lwords.txt file in working directory (with optional index argument, explained afterwards)
$ ls
dist lwords.txt
$ ./dist
OR
$ ./dist --index <index>
Old behavior
Persists regardless of filesystem state.
$ ./dist <word1> <word2>
Behavior description
New behavior case should print a list of measurements sorted by the results of measurements.
Example:
w3, w2 = 3
w2, w1 = 2
w1, w3 = 1
Words are taken from the file. Each word is compared with each another word (order does not matter).
If the index argument is given, it should compare all words only to the word in a file, referenced by the value of index argument. If there is no word in file under given index, print an error and usage message.
Cases
New behavior cases
lwords.txt
file in working directory (with optional index argument, explained afterwards)OR
Old behavior
Persists regardless of filesystem state.
Behavior description
New behavior case should print a list of measurements sorted by the results of measurements. Example:
Words are taken from the file. Each word is compared with each another word (order does not matter). If the
index
argument is given, it should compare all words only to the word in a file, referenced by the value ofindex
argument. If there is no word in file under given index, print an error and usage message.