Classes & Relationships Week 4. Textbook References Chapter 6 – Pg. 213 – 222 You should READ this section. Class Relationships and Associations
Chapter 6 – Pg. 213 – 222
You should READ this section
Show the relationship or Association between classes. For example, this diagram shows the Vehicle and Customer classes. Multiplicity is shown. Arrowheads not commonly used.
NOTE: This is Figure 6.5, page 217
Generalization Class (Super-class)
One Class inherits attributes and operations from another class (called a superclass). Any Attributes and Operations specified in the superclass also exist in the subclass. A Hollow triangle or arrowhead is used to show which classes are subclasses (or superclasses).
Classes form together to create other classes. In this example the Health Team class is comprised of Admin Support, Doctor and Nurse classes. Multiplicity is shown. No Inheritance takes place. A Solid or Hollow diamond is used.
Students take many courses, but can be a student even if they are currently taking no courses. Exactly 1 teacher is assigned to each course, and all courses have an teacher assigned to them. The assigned teacher gives a grade to each student in the course.