Class Diagram
Part 1 Class and OO Fundamentals
Operations
Operations is what sends the messages in the sequence diagrams, the are the same as saying methods.

Main concepts
Abstraction - we only should focus on the essential aspects, baso only the things that matter outside of the object
Encapsulation - separation of the external information from the internal information

Encapsulation example
Part 2 Associations
Associations - is what allows classes to collaborate by using each others operations

The thing that is circled is the association, it is missing the mutilicities
Multiplicities


Unary binary and ternary

Unary - objects can point to other objects of the same class
Ternary - 11 to many players per 1 year and 1 team

Company does not know about the person objects, i.e. company does dont have a person list
Class Diagram example

Part 4 Special Types of Associations
Part of (relationships)
Composition
Composition - child cannot exist without its parent

Aggregation
Aggregation - parent and child can exist independently

Kind of (relationship)
hierarchical relationships
Inheritance
When a child class is derived from a parent class

Generalisation
When common attributes and methods are assigned to a super class
Example without generalisation

Specialisation
Child classes can have specialised attributes and methods as well as the ones inherited from the parent class
Example without specialisation

Abstract Classes
Class that will have no objects, it is used to he inherited from, for example animal