A "has-a" relationship (composition) is better than an "is-a" relationship (inheritance) when the relationship between objects represents ownership or when the behavior of one object should not directly depend on another. "Has-a" is more flexible because it allows for modular, reusable components without tightly coupling classes. For example, if a Car class has a Engine class as a field, it reflects a "has-a" relationship since a car owns an engine, but an engine is not inherently a type of car. Composition also avoids the pitfalls of inheritance, such as inheriting unnecessary behaviors or violating the principle of single responsibility. By using "has-a," you can change or replace the associated object (Engine) without altering the parent object (Car), which promotes loose coupling and enhances code maintainability.