Implemented location class and test cases.