Universe Sandbox is a beautiful application available for free (Windows only!):
Smash planets together, introduce rogue stars, and build new worlds from spinning discs of debris. Fire a moon into a planet or destroy everything you’ve created with a super massive black hole.
It is quite interesting to see how many configurations bring about the expulsion of an object from a solar system, even if gravity is exclusively attractive in nature.