0% found this document useful (0 votes)
8 views22 pages

What Is UML

UML, or Unified Modeling Language, is a visual modeling language used to represent the behavior and structure of systems, aiding communication among software engineers, businessmen, and system architects. It is essential for planning complex applications and helps non-programmers understand system requirements and functionalities. The document outlines the types of structural UML diagrams, specifically class diagrams, and provides a step-by-step guide on how to create them.

Uploaded by

charusps46
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views22 pages

What Is UML

UML, or Unified Modeling Language, is a visual modeling language used to represent the behavior and structure of systems, aiding communication among software engineers, businessmen, and system architects. It is essential for planning complex applications and helps non-programmers understand system requirements and functionalities. The document outlines the types of structural UML diagrams, specifically class diagrams, and provides a step-by-step guide on how to create them.

Uploaded by

charusps46
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 22

What is UML?

visual modeling language


• behavior and structure of a system.

• UML helps software engineers, businessmen, and


system architects with modeling, design, and analysis.

• The International Organization for Standardization (ISO)


published UML as an approved standard in 2005. UML
has been revised over the years and is reviewed
periodically.
Why do we need UML?

• Complex applications need collaboration and planning


from multiple teams
• Businessmen do not understand code. So UML becomes
essential to communicate with non-programmers about
essential requirements, functionalities, and processes of
the system.

• A lot of time is saved down the line when teams can


visualize processes, user interactions, and the static
structure of the system.
Structural Diagrams
Types of Structural UML
diagrams
• Class Diagram
• classes, attributes, methods, and the relationships
between them.
What is a class?
• class is a blueprint or template for creating objects.

• Objects are instances of classes, and each class defines


a set of attributes (data members) and methods
(functions or procedures) that the objects created from
that class will possess
UML Class Notation
•# for protected (visible to subclasses)
•~ for package or default visibility (visible to classes in the same package

• Class Name
• Attributes:Attributes, also known as properties or fields
• Methods, also known as functions or operations- public, private

• Visibility Notation
• + for public (visible to all classes)
• - for private (visible only within the class)
• # for protected (visible to subclasses)
• ~ for package or default visibility (visible to classes in the same
package
• In (Input):
• An input parameter is a parameter passed from the
calling object (client) to the called object (server) during
a method invocation.
• Out (Output):
• An output parameter is a parameter passed from the
called object (server) back to the calling object (client)
after the method execution.
• InOut (Input and Output):
• An InOut parameter serves as both input and output. It
carries information from the calling object to the called
object and vice versa.
How to draw Class Diagrams
• Step 1: Identify Classes:
• Start by identifying the classes in your system. A class represents a blueprint for objects and should encapsulate related attributes
and methods.
• Step 2: List Attributes and Methods:
• For each class, list its attributes (properties, fields) and methods (functions, operations). Include information such as data types and
visibility (public, private, protected).
• Step 3: Identify Relationships:
• Determine the relationships between classes. Common relationships include associations, aggregations, compositions, inheritance,
and dependencies. Understand the nature and multiplicity of these relationships.
• Step 4: Create Class Boxes:
• Draw a rectangle (class box) for each class identified. Place the class name in the top compartment of the box. Divide the box into
compartments for attributes and methods.
• Step 5: Add Attributes and Methods:
• Inside each class box, list the attributes and methods in their respective compartments. Use visibility notations (+ for public, – for
private, # for protected, ~ for package/default).
• Step 6: Draw Relationships:
• Draw lines to represent relationships between classes. Use arrows to indicate the direction of associations or dependencies. Different
line types or notations may be used for various relationships.
• Step 7: Label Relationships:
• Label the relationships with multiplicity and role names if needed. Multiplicity indicates the number of instances involved in the
relationship, and role names clarify the role of each class in the relationship.
• Step 8: Review and Refine:
• Review your class diagram to ensure it accurately represents the system’s structure and relationships. Refine the diagram as needed

You might also like