Object-Oriented Programming · Square · Medium
A big park for pedestrians is laid out as a loop, with landmarks placed around the circle. The park wants to offer walking directions: given any two of its landmarks, the feature should tell a visitor how long the walk from one to the other takes. Your task has three parts: Define the type used to represent a node (a landmark) in this circular layout. Implement the method that computes the shortest distance between two landmarks. Write tests that exercise the method across a…