Question: Question # 2 : ( 4 Points ) Write a Java program that defines a string called nameId which contains characters from your name and

Question #2:
(4 Points)
Write a Java program that defines a string called nameId which contains characters from your name and your ID as shown in the example below. Then generate 10 strings each with the same length as nameId. The program should compute the Levenshtein distance between nameId and each of the generated strings. Finally it should print the top three closest strings to nameId according to the Levenshtein distance.
Note: The Levenshtein distance is defined as the minimal number of characters you have to replace insert or delete to transform string1 into string2.
Example:
Student name:Mostafa dallal
Student ID: 202210640
nameId: "A2h0m2a2d1A064i0"
Question # 2 : ( 4 Points ) Write a Java program

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Accounting Questions!