I have a situation where I have Model A that has a variety of properties. I have discovered that some of the properties are similar across other models. My thought was I could create Model B and Model C and have Model A be a composite with a Model B property and a Model C property.
Just trying to determine if this is the best way to handle this situation.
It’s definitely valid in certain situations. Let’s say you have a
Personclass and aCompanyclass, and they have the common propertiesstreetNumber,streetName,postcode, etc. It makes sense to make a new model class calledAddressthat bothPersonandCompanycontain. Inheritance is the completely wrong way to go in such a situation.