OOSD Unit 2
OOSD Unit 2
Class Relationships
To create a class diagram, the next step is building relationships. There are three
main types of relationships here:
1. Generalizations
2. Associations
3. Dependencies
Generalizations
Associations
Dependencies
Dependency shows that one class depends on another. Change in one class will
create change in another class. For example, an employee is dependent on the
organization.
This class diagram for the atm maps out the structure and attributes of how an
ATM works. It also shows the relationship between multiple classes. You can use
this template as it is or modify it according to your needs.
This hotel management class diagram carefully links all classes joining them
together through arrows to show the relationship between them. You can easily
customize this hotel management class diagram and add more classes if you
like.
The library management system class diagram has multiple classes like the user,
librarian, book, account, etc. It then describes the attributes and operations of
each of the classes linking them together for the library management system.
This online shopping class diagram shows the domain model for online shopping.
This diagram will help software engineers and business analysts easily
understand the diagram. The diagram links classes like user and account to
show how an order is placed and then shipped.
In this class diagram, you can show multiple classes like student, account,
course registration manager, course, etc. This class diagram is fairly easy due to
its linear design. Registration, course, and account are subclasses of the
registration manager and are linked to it using a solid arrow. If your registration
system operates a bit differently, then you can add in new classes and easily
modify this template.