Intermediate Object-Oriented Programming Concepts
Q78 / 100

What is a "value object" in OOP design?

Correct! Well done.

Incorrect.

The correct answer is A) An object whose equality is based on its attribute values rather than its identity, often designed to be immutable

A

Correct Answer

An object whose equality is based on its attribute values rather than its identity, often designed to be immutable

Explanation

Value objects (e.g. Money, Point, DateRange) are compared by their data rather than reference identity, and immutability avoids accidental shared-state bugs.

Progress
78/100