Encapsulation ensures that an object's internal state is protected and can only be accessed through its methods. A `CartItem` should use `Product` methods like `getPrice()` to access product details, ensuring that the `Product` class controls how its data is accessed and modified.