Open post

Understanding Relationships

This is a simple UML class diagram example that shows the use of various UML relationships in a class diagram.

  1. School has one or more Departments.
  2. Department offers one or more Subjects.
  3. A particular subject will be offered by only one department.
  4. Department has instructors and instructors can work for one or more departments.
  5. Student can enroll in up to 5 subjects in a School.
  6. Instructors can teach up to 3 subjects.
  7. The same subject can be taught by different instructors.
  8. Students can be enrolled in more than one school.
Import into your Project
Open post

Telephone (Use of Association)

This is a UML class diagram example.

The telephone set has a number of parts: ringer, answering machine, and caller ID display. The answering machine, in turn, may contain a number of recorded messages. The relationship among the telephone set and its parts is an aggregation relation, since the parts are made and can be destroyed independently of the telephone set. The relation between the answering machine and its recorded messages is a composition relation, since the messages are created and destroyed by the machine. The messages cannot exist without the machine. The telephone set is connected to the line, by which it can dial other lines. The line can also signal the telephone set in order to notify an incoming call. The relation between the line and telephone set is thus a two-way association. An excerpt of the class diagram of this system in depicted in this class diagram example.

Import into your Project

Posts navigation

1 2 3 9 10 11 12 13 14 15 45 46 47