To determine which objects are most likely to collide, a game engine parses the space of every model and creates a tree-like structure known as a Boundary Volume Hierarchy (BVH). This post shows a visualization of the BVH algorithm.
Object Programming provides three different ways to encapsulate data. You can encapsulate data members, methods, and classes. Learn how to implement each.
By coding to the interface, you provide more flexibility to your app. You will be able to extend your app without the need to modify the previously written code.