Basics of Unified Modeling Language (UML) Flashcards

1
Q

What is UML?

A

The Unified Modeling Language (UML) is a general-purpose, developmental, modeling language in the field of software engineering that is intended to provide a standard way to visualize the design of a system. UML is visual modeling language.
UML helps you specify, visualize, and document models of software systems, including their structure and design, in a way that meets all of these requirements.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

A Conceptual Model of UML

A

To understand the conceptual model of UML, first we need to clarify what is a conceptual model? and why a conceptual model is required?
A conceptual model can be defined as a model which is made of concepts and their relationships.
A conceptual model is the first step before drawing a UML diagram. It helps to understand the entities in the real world and how they interact with each other.
As UML describes the real-time systems, it is very important to make a conceptual model and then proceed gradually. The conceptual model of UML can be mastered by learning the following three major elements :

  • UML building blocks
  • Rules to connect the building blocks
  • Common mechanisms of UML
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Object-Oriented Concepts

A

UML can be described as the successor of object-oriented (OO) analysis and design.

An object contains both data and methods that control the data. The data represents the state of the object. A class describes an object and they also form a hierarchy to model the real-world system. The hierarchy is represented as inheritance and the classes can also be associated in different ways as per the requirement.

Objects are the real-world entities that exist around us and the basic concepts such as abstraction, encapsulation, inheritance, and polymorphism all can be represented using UML.

UML is powerful enough to represent all the concepts that exist in object-oriented analysis and design. UML diagrams are representation of object-oriented concepts only. Thus, before learning UML, it becomes important to understand OO concept in detail.

Following are some fundamental concepts of the object-oriented world −

Objects − Objects represent an entity and the basic building block.

Class − Class is the blue print of an object.

Abstraction − Abstraction represents the behavior of an real world entity.

Encapsulation − Encapsulation is the mechanism of binding the data together and hiding them from the outside world.

Inheritance − Inheritance is the mechanism of making new classes from existing ones.

Polymorphism − It defines the mechanism to exists in different forms.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Building Blocks

A

As UML describes the real-time systems, it is very important to make a conceptual model and then proceed gradually. The conceptual model of UML can be mastered by learning the following three major elements −

UML building blocks
Rules to connect the building blocks
Common mechanisms of UML

The building blocks of UML can be defined as −

Things
Relationships
Diagrams

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Things

A

Things are the most important building blocks of UML. Things can be −

Structural
Behavioral
Grouping
Annotational

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Structural Things

A

Structural things define the static part of the model. They represent the physical and conceptual elements. Following are the brief descriptions of the structural things.

Class − Class represents a set of objects having similar responsibilities.

Interface − Interface defines a set of operations, which specify the responsibility of a class.

Collaboration −Collaboration defines an interaction between elements.

Use case −Use case represents a set of actions performed by a system for a specific goal.

Component −Component describes the physical part of a system.

Node − A node can be defined as a physical element that exists at run time.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Behavioral Things

A

A behavioral thing consists of the dynamic parts of UML models. Following are the behavioral things

Interaction − Interaction is defined as a behavior that consists of a group of messages exchanged among elements to accomplish a specific task.

State machine − State machine is useful when the state of an object in its life cycle is important. It defines the sequence of states an object goes through in response to events. Events are external factors responsible for state change

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Grouping Things

A

Grouping things can be defined as a mechanism to group elements of a UML model together. There is only one grouping thing available −

Package − Package is the only one grouping thing available for gathering structural and behavioral things.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Annotational Things

A

Annotational things can be defined as a mechanism to capture remarks, descriptions, and comments of UML model elements. Note - It is the only one Annotational thing available. A note is used to render comments, constraints, etc. of an UML element.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Relationship

A

Relationship is another most important building block of UML. It shows how the elements are associated with each other and this association describes the functionality of an application.

There are four kinds of relationships available.

Dependency is a relationship between two things in which change in one element also affects the other.

Association is basically a set of links that connects the elements of a UML model. It also describes how many objects are taking part in that relationship.

Generalization can be defined as a relationship which connects a specialized element with a generalized element. It basically describes the inheritance relationship in the world of objects.

Realization can be defined as a relationship in which two elements are connected. One element describes some responsibility, which is not implemented and the other one implements them. This relationship exists in case of interfaces.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

UML Diagrams

A

UML diagrams are the ultimate output of the entire discussion. All the elements, relationships are used to make a complete UML diagram and the diagram represents a system.
UML includes the following nine diagrams:

  • Class diagram
  • Object diagram
  • Use case diagram
  • Sequence diagram
  • Collaboration diagram
  • Activity diagram
  • Statechart diagram
  • Deployment diagram
  • Component diagram
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Class

A

Classes are used to represent objects. Objects can be anything having properties and responsibility.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Object

A

The object is represented in the same way as the class. The only difference is the name which is underlined as shown in the following figure.
As the object is an actual implementation of a class, which is known as the instance of a class. Hence, it has the same usage as the class.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Interface

A

Interface is used to describe the functionality without implementation. Interface is just like a template where you define different functions, not the implementation. When a class implements the interface, it also implements the functionality as per requirement.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Collaboration

A

Collaboration represents responsibilities. Generally, responsibilities are in a group.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Use Case

A

Use case is used to capture high level functionalities of a system.

17
Q

Actor

A

An actor is used in a use case diagram to describe the internal or external entities.

18
Q

Initial State

A

The usage of Initial State Notation is to show the starting point of a process.

19
Q

Final State

A

The usage of Final State Notation is to show the termination point of a process.

20
Q

Active Class

A

Active class looks similar to a class with a solid border. Active class is generally used to describe the concurrent behavior of a system.

21
Q

Component

A

Сomponent is used to represent any part of a system for which UML diagrams are made.

22
Q

Node

A

A node in UML is represented by a square box as shown in the following figure with a name. A node represents the physical component of the system.

23
Q

Behavioral Things

A

Dynamic parts are one of the most important elements in UML. UML has a set of powerful features to represent the dynamic part of software and non-software systems. These features include interactions and state machines.

Interactions can be of two types −

  • Sequential (Represented by sequence diagram)
  • Collaborative (Represented by collaboration diagram)
24
Q

Interaction

A

Interaction is basically a message exchange between two UML components. The following diagram represents different notations used in an interaction.

25
Q

State Machine

A

State machine is used to describe different states of a system component. The state can be active, idle, or any other depending upon the situation.

26
Q

Package

A

Package notation is used to wrap the components of a system

27
Q

Relationships

A

A model is not complete unless the relationships between elements are described properly. The Relationship gives a proper meaning to a UML model. Following are the different types of relationships available in UML.

Dependency
Association
Generalization
Extensibility

28
Q

Dependency

A

It describes the dependent elements and the direction of dependency. The arrow head represents the independent element and the other end represents the dependent element.

29
Q

Association

A

Association describes how the elements in a UML diagram are associated. In simple words, it describes how many elements are taking part in an interaction.

30
Q

Generalization

A

Generalization describes the inheritance relationship of the object-oriented world. It is a parent and child relationship.