Write a Java class named AverageOfDistances that meets the following requirement
ID: 3698188 • Letter: W
Question
Write a Java class named AverageOfDistances that meets the following requirements:
1) Create an instance of the simmetrics JaroWinkler class. Use that instance to compute and print the distance between two runtime arguments. The runtime arguments are Strings that come from theargs array. Label your results.
2) Create an instance of the simmetrics Levenshtein class. Use that instance to compute and print the distance between two runtime arguments. The runtime arguments are Strings that come from the args array. Label your results.
3) In requirements 1 and 2 you obtain one number each (a distance). Compute and print the average of those two distances. Label your results.
4) In requirements 1 and 2 you obtain one number each (a distance). Compute and print the maximum of those two distances. Label your results.
Here is sample output from my solution:
Trial #1
Using two strings: >>>this<<< and >>>those<<<
JaroWinkler: 0.17333335
Levenshtein: 2.0
Average: 1.0866667032241821
Maximum: 2.0
Trial #2
Using two strings: >>>java<<< and >>>programming<<<
JaroWinkler: 0.55303025
Levenshtein: 10.0
Average: 5.276515007019043
Maximum: 10.0
Guide:
Explanation / Answer
Please post JaroWinkler and Levenshtein class.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.