###Some debugging fun###
-
Get latest changes from HackBulgaria repo
git pullorgit clone https://github.com/HackBulgaria/Core-Java-2.git -
Import the DebuggingFun project in Eclipse
- if you use 'import existing projects Eclipse it will not copy it in your workspace
- if you use 'import from file system'
//The ProjectName for all of the three problems below should be 'TDDIntro'
###JUnit Hello world### Implement a method 'getNumberOfDigits(int)' which just counts the number of digits.
- Write the signature of the method
- Write the test, make sure it fails beautifully. Think of some edge cases.
- Implement the method
- Pass your own test! Woohoo!
###Implement a join method### Java does not have a String join method. Apache StringUtils does have, but, well, that's not an excuse.
Make a method that joins strings, with a glue given from the caller of your method.
Can you think of a way for it to work with every object, not just string? Even primitives?
//Glue is the first argument => " "
stichMeUp(" ", "Днес", "видях", 5, "ходещи", "медузи") => "Днес видях 5 ходещи медузи"
- Think of a good name for this method
- Make a test class
- Make several test cases, see that your tests fail mightily : )
- Implement!
###Reduce file path! In Java. In a test-driven way. ### See Problem 27 @ https://github.com/HackBulgaria/Programming101/blob/master/week0/simple_problems2.md