The document discusses inheritance, association, and dependency in object-oriented programming and Unified Modeling Language (UML). It defines inheritance as a class inheriting properties and operations from a parent class. Association represents relationships between classes, such as one-to-one, one-to-many, and many-to-many. Dependency shows the client-supplier relationship between classes to visualize abstraction and separation of concerns. The document also provides UML notations for representing these concepts using lines, arrows and other symbols.
2. What is Inheritance?
Getting characteristics from parent
Real life examples
Child get properties of Parents
Generalize an idea
Usage in problem & solution design makes perfect logical sense
6/6/2016Depertment of Computer Science & Engineering
2
3. Inheritance in OOP
One of the core concepts of OOP
Sub Class, Super Class relation
Sub Class inherits from Supper Class
Inherits properties & operations
Simplify the codes
6/6/2016Depertment of Computer Science & Engineering
3
4. UML Notation - Inheritance
Solid line with a closed arrowhead
From sub Class to super Class(Child
to Parent)
Arrowhead is closed but not filled
Can be tree structured
6/6/2016Depertment of Computer Science & Engineering
4
5. Why its important?
Generalize the Design
Makes easier map to OOP
Logical parts creation of whole project
Visualize relations among objects
Create abstraction
6/6/2016Depertment of Computer Science & Engineering
5
6. What is Association?
The relation among things
Denotes how its related
Family of links
6/6/2016Depertment of Computer Science & Engineering
6
7. Association in OOP
Objects may be linked or combined
May be logically or Physically
Binary, N-Ary
Order of the ends
6/6/2016Depertment of Computer Science & Engineering
7
8. UML Notation - Association
Normally denoted by line
May have any number of links
Four different types of association:
bi-directional, uni-directional,
aggregation and reflexive
Also denote relations – One to one,
one to many, many to many etc.
6/6/2016Depertment of Computer Science & Engineering
8
9. Why its important?
Get grouped or linked objects
Relations among Classes
Get DB relations
How Classes are related
6/6/2016Depertment of Computer Science & Engineering
9
10. What is Dependency?
A relationship among things
Provides client-supplier visualization
Create abstraction of solution & problem
6/6/2016Depertment of Computer Science & Engineering
10
11. Dependency in OOP
Separates dependent & independent Classes
Clarify the deployment of Classes on situations
Creates abstractions in terms of usage
6/6/2016Depertment of Computer Science & Engineering
11
12. UML Notation – Week Dependency
Denoted by a dashed arrow
From client to supplier
Arrow is not filled
Also denote usage, create etc.
operation
6/6/2016Depertment of Computer Science & Engineering
12
13. Why its important?
Simplify the relationship among models or classes
Shows usages dependency
Shows usages abstraction of whole project
6/6/2016Depertment of Computer Science & Engineering
13