The request
“Create a domain model with a User who owns one Profile containing a bio, age and gender.”
Then tryAdd a photo collection to Profile.Add a verification status to User.
What is in this drawing
Read the decisions behind it.
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.
More like this