La solicitud
“Create a domain model with a User who owns one Profile containing a bio, age and gender.”
Entonces pruebaAdd a photo collection to Profile.Add a verification status to User.
Qué hay en este dibujo
Lee las decisiones que hay detrás.
01
Chose composition (strong ownership) over aggregation because a Profile cannot exist without a User in this context.
02
Included essential attributes and methods to illustrate class structure.
Use this as a starting point for modeling entities in social or dating apps where users have singular profiles.