You are on page 1of 22

MODULE 4B

UNIFIED MODELLING
LANGUAGE
COMPROG – COMPUTER PROGRAMMING
TOPICS:
• UNIFIED MODELLING LANGUAGE
 Basic Concepts
 Class Diagram
 Association (Directed and Reflexive)
 Aggregation
 Composition
 Multiplicity
 Inheritance/Generalization
UNIFIED MODELLING LANGUAGE

- a standard language for


specifying, visualizing,
constructing, and
documenting the artifacts of
software systems.
UNIFIED MODELLING LANGUAGE
- a pictorial language used to make software
blueprints

- not a programming language but tools can be used


to generate code in various languages using UML
diagrams

- has a direct relation with object oriented analysis


and design
UNIFIED MODELLING LANGUAGE
• GOAL OF UML
- to define some general purpose modeling
language
- not only made for developers but also for
business users, common people, and anybody
interested to understand the system
- defined as a simple modeling mechanism
UNIFIED MODELLING LANGUAGE
• UML BUILDING BLOCKS
- Things
- Relationships
- Diagrams
UNIFIED MODELLING LANGUAGE
• UML MODELING
STRUCTURAL MODELING BEHAVIORAL MODELING ARCHITECTURAL MODELING
- captures the static features of - describes the interaction in - represents the overall
a system the system framework of the system

• Classes diagrams • Activity diagrams - contains both structural and


• Objects diagrams • Interaction diagrams behavioral elements of the
• Deployment diagrams • Use case diagrams system
• Package diagrams
• Composite structure diagram - Package diagram
• Component diagram
UNIFIED MODELLING LANGUAGE

• CLASS DIAGRAM
- the main building block in
object-oriented modeling
- used to show the different
objects in a system, their
attributes, their operations and
the relationships among them.
UNIFIED MODELLING LANGUAGE
Classes in class diagrams are represented by boxes that
are partitioned into three:

• The top partition contains the name of the class.


• The middle part contains the class’s attributes.
• The bottom partition shows the possible operations that
are associated with the class.
UNIFIED MODELLING LANGUAGE
• RELATIONSHIP IN CLASS DIAGRAM
•Association
•Directed Association - Classes are interrelated to
•Reflexive Association each other in specific ways.
•Multiplicity Relationship in class diagrams
•Aggregation include different types of
•Composition logical connections.
•Inheritance/Generalization
UNIFIED MODELLING LANGUAGE

• ASSOCIATION
- encompasses just about any logical
connection or relationship between
classes

- If two classes in a model need to


communicate with each other, there
must be link between them
UNIFIED MODELLING LANGUAGE

• ASSOCIATION
DIRECTED ASSOCIATION
- refers to a directional relationship
represented by a line with an arrowhead.
The arrowhead depicts a container-
contained directional flow.

- indicates that control flows from one


classifier to another
UNIFIED MODELLING LANGUAGE

• ASSOCIATION
REFLEXIVE ASSOCIATION

- occurs when a class may have multiple


functions or responsibilities

- association between instances of the


same class.
UNIFIED MODELLING LANGUAGE

• MULTIPLICITY
- active logical association when the
cardinality of a class in relation to another
is being depicted

For example, one fleet may include multiple


airplanes, while one commercial airplane
may contain zero to many passengers. The
notation 0..* in the diagram means “zero to
many”.
UNIFIED MODELLING LANGUAGE
• MULTIPLICITY
Indicates that every Instructor
has one or more Students

A single student can associate


with multiple teachers

Using role names


UNIFIED MODELLING LANGUAGE
• AGGREGATION
- refers to the formation of a particular class as a
result of one class being aggregated or built as
a collection

- implies a relationship where the child can exist


independently of the parent

- the contained classes are not strongly


dependent on the lifecycle of the container
UNIFIED MODELLING LANGUAGE

• COMPOSITION
- emphasizing the dependence of
the contained class to the life cycle
of the container class

- connotes that a strong life cycle is


associated between the classes.
UNIFIED MODELLING LANGUAGE
• INHERITANCE/GENERALIZATION
- refers to a type of relationship wherein
one associated class is a child of
another by virtue of assuming the same
functionalities of the parent class

- the child class is a specific type of the


parent class
AGGREGATION: ATM can still
exist without a bank
AGGREGATION: Customer can
still exist without a bank

MULTIPLICITY: A single
account belongs to a particular
customer while a customer can
have at most 2 accounts INHERITANCE: Current
Account and Saving Account
are types of Account
SUMMARY

• Unified Modeling Language is a standard language


for specifying, visualizing, constructing, and
documenting the artifacts of software systems.
• Object-Oriented analysis and design defines as
investigation of objects .
• UML Modeling can be classified as structural
modeling, behavioral modeling or architectural
modeling.
SUMMARY

• Class diagram is used to show the different objects in


a system, their attributes, their operations and the
relationships among them.

• Association, Multiplicity, Aggregation, Composition,


Inheritance/Generalization shows the relationship of
the classes.
END OF PRESENTATION

You might also like