Constructors initialize new objects with default or specified values.
Constructors are special methods used to initialize objects. They ensure that an object starts with a valid state. For instance, when creating a CartItem, you might want to set its associated Product and initial quantity.