We could create an interface and have a separate class for each type of navigation. This would solve the problem of having to modify the navigate method, but inheritance is static and we cannot change ...