9. Building Objects and Object-Oriented Design
A Class Domain is a package of related concepts, roles, procedures, events, and entities. To keep it simple without going into to much detail, Domains is basically the act of grouping classes by their similarities. If they are highly coupled, they can become highly dependant on each other, which is not recommened. Like everything else, there is pros and cons to it but we will not be covering Class Domains during this lesson.
If you would like to know more about this, click here.
Cardinality is when there is restrictions put in place betweens classes that have some type of relationship. It is good practice to implement restrictions in the system by default rather than depending on developers to know and follow the restrictions every time they make any changes or updates to the code. Cardinality is represented by a solid line between classes.
There is different type of cardinality, some examples are:
- Zero to Many
- One to Many
- One to One
- Many to Many
Download Lesson Notes