Lecture 1 - Introduction
General introduction to the course. Rules of the game. Topics we'll cover. Team intro and many more!
Homework 1
Add a method to Homework class that calculates the Levenshtein distance between two strings. The signature should be public int levenshteinDistance(String a, String b). Implement at least 1 test for the method in HomeworkTest.
Feel free to use any pre-made implementation of the method! This homework is about getting the code changes, testing, packaging and submission correct and doesn't have much to do with Levenshtein distance!
Homework Feedback
- Everybody who submitted got full points!
- The levenshteinDistance method was actually present in StringUtils. Just to keep in mind for the future that check the libraries before going hunting for an algorithm somewhere.
- I'm pretty sure I would have found bugs in your implementation.
- When submitting recursive methods also keep in mind that when testing with larger datasets you might run into stack limitations.
- If you find yourself doing a lot of very same initialisation in your tests you might want to check out the @Before annotation. See this StackOverflow post for an explanation.
- You can have your IDE enforce a consistent style. See this StackOverflow post for example. This will keep your files looking consistent!