0% found this document useful (0 votes)
7 views

software record

software record

Uploaded by

245122750018
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views

software record

software record

Uploaded by

245122750018
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 71

MATURI VENKATA SUBBA RAO (MVSR) ENGINEERING COLLEGE

(An Autonomous Institution)


(Sponsored by Matrusri Education Society, Estd. 1980)
Affiliated to Osmania University & Recognized ay AICTE
Nadergul (PO), Balapur (M), RR Dist., Hyderabad - 501510

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING

SOFTWARE ENGINEERING
LABORATORY MANUAL & RECORD

NAME

ROLL No.

SUBJECT CODE U21PC482CS

CLASS & SECTION BE 2/4 &

SEMESTER &
IV 2022-2023
ACADEMIC YEAR
MATURI VENKATA SUBBA RAO (MVSR) ENGINEERING COLLEGE
(An Autonomous Institution)
(Sponsored by Matrusri Education Society, Estd. 1980)
Affiliated to Osmania University & Recognized ay AICTE
Nadergul (PO), Ballarpur (M), RR Dist., Hyderabad - 501510

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING

SOFTWARE ENGINEERING LAB

Certificate
Department of COMPUTER SCIENCE & ENGINEERING

Certified that this is a bonafide work of lab experiments carried out by

Mr. /Ms. _______________________________________________________________ bearing

Roll. No. _______________________________________________________________ under

The course SOFTWARE ENGINEERING Laboratory (Code ---------U21PC482CS----------)

For B.E. 2 / 4 , SEM - IV of COMPUTER SCIENCE & ENGINEERING during the

Academic year ______2022-2023_______.

Internal Examiner External Examiner

HOD, CSE
DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING

VISION
● To impart technical education of the highest standards, producing competent and confident
engineers with an ability to use computer science knowledge to solve societal problems.

MISSION
● To make the learning process exciting, stimulating and interesting.
● To impart adequate fundamental knowledge and soft skills to students.
● To expose students to advanced computer technologies in order to excel in engineering
practices by bringing out the creativity in students.
● To develop economically feasible and socially acceptable software.

PROGRAM EDUCATIONAL OBJECTIVES (PEOs)

The Bachelor’s program in Computer Science and Engineering is aimed at preparing graduates who
will:-
PEO-1: Achieve recognition through demonstration of technical competence for successful
execution of software projects to meet customer business objectives.
PEO-2: Practice life-long learning by pursuing professional certifications, higher education
or research in the emerging areas of information processing and intelligent systems at a
global level.
PEO-3: Contribute to society by understanding the impact of computing using a
multidisciplinary and ethical approach.

(A) PROGRAM OUTCOMES (POs)

At the end of the program the students (Engineering Graduates) will be able to:
1. Engineering knowledge: Apply knowledge of mathematics, science, engineering
fundamentals, and an engineering specialization to the solution of complex engineering
problems.
2. Problem analysis: Identify, formulate, review research literature, and analyse complex
engineering problems reaching substantiated conclusions using first principles of
mathematics, natural sciences, and engineering sciences.
3. Design/development of solutions: Design solutions for complex engineering problems and
design system components or processes that meet specified needs with appropriate
consideration for public health and safety, and the cultural, societal, and environmental
considerations.
4. Conduct investigations of complex problems: Use research-based knowledge and
research methods including design of experiments, analysis and interpretation of data, and
synthesis of the information to provide valid conclusions.
5. Modern tool usage: Create, select, and apply appropriate techniques, resources, and
modern engineering and IT tools including prediction and modeling to complex engineering
activities with an understanding of the limitations.
6. The engineer and society: Apply reasoning informed by the contextual knowledge to
assess societal, health, safety, legal and cultural issues and the consequent responsibilities
relevant to the professional engineering practice.
7. Environment and sustainability: Understand the impact of the professional engineering
solutions in societal and environmental contexts, and demonstrate the knowledge of, and
need for sustainable development.
8. Ethics: Apply ethical principles and commit to professional ethics and responsibilities and
norms of the engineering practice.
9. Individual and team work: Function effectively as an individual, and as a member or
leader in diverse teams, and in multidisciplinary settings.
10. Communication: Communicate effectively on complex engineering activities with the
engineering community and with society at large, such as being able to comprehend and
write effective reports and design documentation, make effective presentations, and give
and receive clear instructions.
11. Project management and finance: Demonstrate knowledge and understanding of the
engineering and management principles and apply these to one’s own work, as a member
and leader in a team, to manage projects and in multidisciplinary environments.
12. Lifelong learning: Recognize the need for, and have the preparation and ability to engage
in independent and life-long learning in the broadest context of technological change.

(B) PROGRAM SPECIFIC OUTCOMES (PSOs)

PSO1: Demonstrate competence to build effective solutions for computational real-world problems
using software and hardware across multi-disciplinary domains.

PSO2: Adapt to current computing trends for meeting the industrial and societal needs through a
holistic professional development leading to pioneering careers or entrepreneurship.
SOFTWARE ENGINEERING LAB

COURSE OBJECTIVES & COURSE OUTCOMES

Course Objectives:

Course Outcomes:

Signature of the Student


SOFTWARE ENGINEERING LAB

SYLLABUS

I. FORWARD ENGINEERING
Students have to form a team with a batch size of two or three and take up a case study based
project to analyze, plan, design UML models and create a prototypical model (by identifying
deliverables) by coding the developed designs and finally document considering any one example
of the following domains:-
1. Academics (Eg: Course Registration System, Student marks analyzing system)
2. Health Care (Eg: Expert system to prescribe medicines for given symptoms, Remote
Diagnostics, Patient/Hospital Management System)
3. Finance (Eg: Banking:ATM/NetBanking, UPI:PayTM/PhonePay, Stocks:Zerodha)
4. E-Commerce (Eg: various online shopping portals like FlipKart/Amazon/Myntra)
5. Logistics (Eg. Postal/Courier:IndiaPost/DTDC/UPS/FedEx, Freight:Maersk)
6. Hospitality (Eg: Tourism Management:Telangana Tourism/Incredible India, Event
Management: MeraEvents/BookMyShow/Explara/EventBrite)
7. Social Networking (Eg: LinkedIn, FaceBook, Shaadi.com, BharatMatrimony, Tinder)
8. Customer Support (Eg. Banking Ombudsman,Indian Consumer Complaints Forum)
9. Booking/Ticketing (Eg. for Food:Zomato/Swiggy/BigBasket/Grofers/JioMart,
Hotel:OYO/Trivago or Travel: {Cars:Uber/OLA/Zoom, Railways:IRCTC,
Buses:OnlineTSRTC/RedBus/AbhiBus, Flights:MakeMyTrip/Goibibo, Ships:Lakport})

II. REVERSE ENGINEERING: Students have to refer any project repository:GitLab/GitHub,


execute the code in order to observe its functionalities/features/requirements and by the help of any
tool derive the designs from the code for understanding the relationships among various
subsystems/classes/components and if the tool partially generates models then identify by
associating elements to judge/mark the appropriate relationships.

III. TESTING: Prepare Test Plan and develop Test Case Hierarchy to monitor or uncover/report
errors using manual/automated testing tools

Software Required: StarUML, Umbrello, LucidChart, NetBeans/Eclipse IDE, XAMPP/MEAN


stack, JUnit, JMeter, Selenium, Bugzilla
INDEX

Experiment Submission Signature of


SNo Experiment Title Date Date Faculty In
charge

10

11

12

13

14

15
SE Lab, BE (CSE), Dept. of CSE, MVSREC

SOFTWARE ENGINEERING LAB

Model
A model is a simplified representation of a thing. The model captures the important aspects of
the thing being modeled and leaves out the rest of the details. The benefit of models is that they
can be represented in a medium (2D or 3D) we like.
A model of a software system can be developed using a modeling language like UML. The
model will have both semantics and notation and can take various forms that include both
pictures and text. The model is intended to be easier to use for certain purposes than the final
system.

What are models for? (Need for models)


Models are used for the following purposes:
➢ To capture and precisely state the requirements and domain knowledge so that all the
stakeholders may understand and agree on them.
➢ To think about the design of a system.
➢ To capture design decisions in a mutable form separate from the requirements.
➢ To generate usable work products.
➢ To organize, find, filter, retrieve, examine and edit information about large systems.
➢ To explore multiple solutions economically.
➢ To master complex systems.

INTRODUCTION to UML (Unified Modelling Language)


UML is a standard general purpose visual modeling language for:-
1. Specifying : Describe something clearly and exactly
2. Visualizing : Technique for creating images or diagrams to communicate a message
3. Constructing : Build an idea or theory by bringing together conceptual elements
4. Documenting : Record the details of an event or process
Above are the artifacts of software systems.

UML is a pictorial language used to make software blueprints for non-software systems as well.
UML is NOT a programming language but tools used to draw models can generate code in various
languages.
UML has a direct relation with object oriented analysis, design and programming.
→ OO Analysis: identify objects and describe them in a proper way
→ OO Design: Making a design by identifying relationships among objects
→ OO Programming: implementation using OO languages
Fundamental concepts of the object-oriented world −
1. Objects − Objects represent an entity and the basic building block.
2. Class − Class is the blueprint of an object.
3. Abstraction − Abstraction represents the behavior of a real world entity.
4. Encapsulation − Encapsulation is the mechanism of binding the data together and hiding
them from the outside world.
5. Inheritance − Inheritance is the mechanism of making new classes from existing ones.
6. Polymorphism − It defines the mechanism to exists in different forms.
Goal of UML is to provide a standard notation that can be used by all object-oriented methods and
to select and integrate the best elements of precursor notations.
Page No. 1
SE Lab, BE (CSE), Dept. of CSE, MVSREC

History of UML
1993 Booch was working in Rational Corporation along with other members.
1994, Rumbaugh joined Rational. Unification to combine Booch and Rumbaugh’s concepts
1995, Jacobson joined Rational. Unification to combine Booch, Rumbaugh and Jacobson’s concepts
named as Unified Modeling Language (UML).
1996, Proposal to Object Management Group (OMG) for recognizing UML as standard language.
1997, OMG recognized UML as a standard language.
2000, ISO recognized UML as a standard language. The version of UML was 1.0.
2004, another major upgrade was made to UML’s specification which is known as UML 2.0.

Why UML?
The UML has a lot of different diagrams (models) to look at a system from many different
viewpoints. A software development will have many stakeholders playing a part; For Example:
Analysts, Designers, Coders, Testers, QA, The Customer and Technical Authors. All of these
people are interested in different aspects of the system, and each of them require a different level
of detail. For example, a coder needs to understand the design of the system and be able to convert
the design to a low level code. The UML attempts to provide a language so expressive that all
stakeholders can benefit from at least one UML diagram.

The Fundamental objectives of Object Oriented Design in UML are as follows:


1. Provide users with a ready-to-use, expressive visual modeling language so they can develop
and exchange meaningful models.
2. Provide extensibility and specialization mechanisms to extend the core concepts.
3. Be independent of particular programming languages and development processes.
4. Provide a formal basis for understanding the modeling language.
5. Encourage the growth of the OO tools market.
6. Support higher-level development concepts such as collaborations, frameworks, patterns
and components.
7. Integrate best practices.

Complex applications need collaboration and planning from multiple teams and hence require a
clear and concise way to communicate amongst them. Businessmen do not understand the code. So
UML becomes essential to communicate with non-programmers essential requirements,
functionalities and processes of the system. A lot of time is saved down the line when teams are
able to visualize processes, user interactions and static structure of the system

Page No. 2
SE Lab, BE (CSE), Dept. of CSE, MVSREC

Conceptual Model of UML


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 −
1. UML building blocks (Things, Relationships, Diagrams)
2. Rules to connect the building blocks
3. Common mechanisms of UML

1. UML Building Blocks


The building blocks of UML can be defined as −
1.1. Things
1.2. Relationships
1.3. Diagrams

1.1. Things
Things are the most important building blocks of UML. Things can be −
1.1.1. Structural
1.1.2. Behavioral
1.1.3. Grouping
1.1.4. Annotational

1.1.1. Structural Things


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.

Page No. 3
SE Lab, BE (CSE), Dept. of CSE, MVSREC

1.1.2. Behavioral Things


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

1.1.3. Grouping Things


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.

1.1.4. Annotational Things


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.

1.2. Relationship
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
Dependency is a relationship between two things in which change in one element
also affects the other.

Association
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
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.

Page No. 4
SE Lab, BE (CSE), Dept. of CSE, MVSREC

Realization
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.

1.3. UML Diagrams

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.

The visual effect of the UML diagram is the most important part of the entire process. All
the other elements are used to make it complete.

UML includes the following nine diagrams, the details of which are described in the
subsequent chapters.

1.3.1. Use case diagram


1.3.2. Object diagram
1.3.3. Class diagram
1.3.4. State diagram
1.3.5. Activity diagram
1.3.6. Collaboration diagram
1.3.7. Sequence diagram
1.3.8. Component diagram
1.3.9. Deployment diagram

UML makes the use of elements and forms associations between them to form diagrams.
Diagrams in UML can be broadly classified as:
➢ Structural Diagrams – Capture static aspects of a system
➢ Behavior Diagrams – Capture dynamic aspects of the system

Page No. 5
SE Lab, BE (CSE), Dept. of CSE, MVSREC

1.3.1. Use case diagram


Use case diagrams consist of actors, use cases and their relationships. The diagram is used to model
the system/subsystem of an application. A single use case diagram captures a particular
functionality of a system.
Hence to model the entire system, a number of use case diagrams are used.
Purpose of Use Case Diagrams
The purpose of a use case diagram is to capture the dynamic aspect of a system. However, this
definition is too generic to describe the purpose, as other four diagrams (activity, sequence,
collaboration, and State chart) also have the same purpose. We will look into some specific
purpose, which will distinguish it from the other four diagrams.
Use case diagrams are used to gather the requirements of a system including internal and external
influences. These requirements are mostly design requirements. Hence, when a system is analyzed
to gather its functionalities, use cases are prepared and actors are identified.
When the initial task is complete, use case diagrams are modeled to present the outside view.
In brief, the purposes of use case diagrams can be said to be as follows −
➢ Used to gather the requirements of a system.
➢ Used to get an outside view of a system.
➢ Identify the external and internal factors influencing the system.
➢ Show the interaction among the requirements are actors.
How to Draw a Use Case Diagram?
Use case diagrams are considered for high level requirement analysis of a system. When the
requirements of a system are analyzed, the functionalities are captured in use cases.
We can say that use cases are nothing but the system functionalities written in an organized manner.
The second thing which is relevant to use cases are the actors. Actors can be defined as something
that interacts with the system.
Actors can be a human user, some internal applications, or may be some external applications.
When we are planning to draw a use case diagram, we should have the following items identified.
➢ Functionalities to be represented as use case
➢ Actors
➢ Relationships among the use cases and actors.
Use case diagrams are drawn to capture the functional requirements of a system. After identifying
the above items, we have to use the following guidelines to draw an efficient use case diagram
➢ The name of a use case is very important. The name should be chosen in such a way so that
it can identify the functionalities performed.
➢ Give a suitable name for actors.
➢ Show relationships and dependencies clearly in the diagram.
➢ Do not try to include all types of relationships, as the main purpose of the diagram is to
Page No. 6
SE Lab, BE (CSE), Dept. of CSE, MVSREC

identify the requirements.


➢ Use notes whenever required to clarify some important points.
Following is a sample use case diagram representing the order management system. Hence, if we
look into the diagram then we will find three use cases (Order, Special-order, and Normal Order)
and one actor which is the customer.
The Special-order and Normal Order use cases are extended from Order use case. Hence, they
have an extended relationship. Another important point is to identify the system boundary, which
is shown in the picture. The actor Customer lies outside the system as it is an external user of the
system.

Where to Use a Use Case Diagram?


As we have already discussed there are five diagrams in UML to model the dynamic view of a
system. Now each and every model has some specific purpose to use. Actually these specific
purposes are different angles of a running system.
To understand the dynamics of a system, we need to use different types of diagrams. Use case
diagrams are one of them and its specific purpose is to gather system requirements and actors.
Use case diagrams specify the events of a system and their flows. But use case diagrams never
describe how they are implemented. Use case diagrams can be imagined as a black box where only
the input, output, and the function of the black box is known.
These diagrams are used at a very high level of design. This high level design is refined again and
again to get a complete and practical picture of the system. A well-structured use case also
describes the pre-condition, post condition, and exceptions. These extra elements are used to make
test cases when performing the testing.
Although use cases are not a good candidate for forward and reverse engineering, still they are
used in a slightly different way to make forward and reverse engineering. The same is true for
reverse engineering. Use case diagrams are used differently to make it suitable for reverse
engineering.
In forward engineering, use case diagrams are used to make test cases and in reverse engineering
use cases are used to prepare the requirement details from the existing application.
Use case diagrams can be used for −
➢ Requirement analysis and high level design.
➢ Model the context of a system.
➢ Reverse engineering.
➢ Forward engineering.

Page No. 7
SE Lab, BE (CSE), Dept. of CSE, MVSREC

1.3.2. Object diagram


Object diagrams are derived from class diagrams so object diagrams are dependent upon class
diagrams.
Object diagrams represent an instance of a class diagram. The basic concepts are similar for class
diagrams and object diagrams. Object diagrams also represent the static view of a system but this
static view is a snapshot of the system at a particular moment.
Object diagrams are used to render a set of objects and their relationships as an instance.

Purpose of Object Diagrams


The purpose of the diagram should be understood clearly to implement it practically. The purposes
of object diagrams are similar to class diagrams.
The difference is that a class diagram represents an abstract model consisting of classes and their
relationships. However, an object diagram represents an instance at a particular moment, which is
concrete in nature.
It means the object diagram is closer to the actual system behavior. The purpose is to capture the
static view of a system at a particular moment.
The purpose of the object diagram can be summarized as −
➢ Forward and reverse engineering.
➢ Object relationships of a system
➢ Static view of an interaction.
➢ Understand object behavior and their relationship from practical perspective

How to Draw an Object Diagram?


We have already discussed that an object diagram is an instance of a class diagram. It implies that
an object diagram consists of instances of things used in a class diagram.
So both diagrams are made of the same basic elements but in different forms. In class diagram
elements are in abstract form to represent the blueprint and in object diagram elements are in
concrete form to represent the real world object.
To capture a particular system, numbers of class diagrams are limited. However, if we consider
object diagrams then we can have an unlimited number of instances, which are unique in nature.
Only those instances are considered, which have an impact on the system.
From the above discussion, it is clear that a single object diagram cannot capture all the necessary
instances or rather cannot specify all the objects of a system. Hence, the solution is −
➢ First, analyze the system and decide which instances have important data and association.
➢ Second, consider only those instances, which will cover the functionality.
➢ Third, make some optimization as the number of instances are unlimited.
Before drawing an object diagram, the following things should be remembered and understood
clearly −
➢ Object diagrams consist of objects.
➢ The link in the object diagram is used to connect objects.
➢ Objects and links are the two elements used to construct an object diagram.
After this, the following things are to be decided before starting the construction of the diagram −
➢ The object diagram should have a meaningful name to indicate its purpose.
➢ The most important elements are to be identified.
➢ The association among objects should be clarified.
➢ Values of different elements need to be captured to include in the object diagram.
➢ Add proper notes at points where more clarity is required.
The following diagram is an example of an object diagram. It represents the Order management
system which we have discussed in the chapter Class Diagram. The following diagram is an
instance of the system at a particular time of purchase. It has the following objects.
➢ Customer
➢ Order
➢ Special-order

Page No. 8
SE Lab, BE (CSE), Dept. of CSE, MVSREC

➢ Normal Order
Now the customer object (C) is associated with three order objects (O1, O2, and O3). These order
objects are associated with special order and normal order objects (S1, S2, and N1). The customer
has the following three orders with different numbers (12, 32 and 40) for the particular time
considered.
The customer can increase the number of orders in the future and in that scenario the object diagram
will reflect that. If order, special order, and normal order objects are observed then you will find
that they have some values.
For orders, the values are 12, 32, and 40 which implies that the objects have these values for a
particular moment (here the particular time when the purchase is made is considered as the
moment) when the instance is captured
The same is true for special order and normal order objects which have number of orders as 20,
30, and 60. If a different time of purchase is considered, then these values will change accordingly.
The following object diagram has been drawn considering all the points mentioned above

Where to Use Object Diagrams?


Object diagrams can be imagined as the snapshot of a running system at a particular moment. Let
us consider an example of a running train
Now, if you take a snap of the running train then you will find a static picture of it having the
following −
➢ A particular state which is running.
➢ A particular number of passengers. which will change if the snap is taken in a different time
Here, we can imagine the snap of the running train is an object having the above values. And this
is true for any real-life simple or complex system.
In a nutshell, it can be said that object diagrams are used for −
➢ Making the prototype of a system.
➢ Reverse engineering.
➢ Modeling complex data structures.
➢ Understanding the system from a practical perspective.

1.3.3. Class diagram


Class diagram is a static diagram. It represents the static view of an application. Class diagram is
not only used for visualizing, describing, and documenting different aspects of a system but also
for constructing executable code of the software application.
Class diagram describes the attributes and operations of a class and also the constraints imposed
on the system. The class diagrams are widely used in the modeling of object oriented systems
because they are the only UML diagrams, which can be mapped directly with object-oriented
languages.
Class diagram shows a collection of classes, interfaces, associations, collaborations, and
constraints. It is also known as a structural diagram.

Page No. 9
SE Lab, BE (CSE), Dept. of CSE, MVSREC

Purpose of Class Diagrams


The purpose of the class diagram is to model the static view of an application. Class diagrams are
the only diagrams which can be directly mapped with object-oriented languages and thus widely
used at the time of construction.
UML diagrams like activity diagram, sequence diagrams can only give the sequence flow of the
application, and however the class diagram is a bit different. It is the most popular UML diagram
in the coder community.
The purpose of the class diagram can be summarized as −
➢ Analysis and design of the static view of an application.
➢ Describe responsibilities of a system.
➢ Base for component and deployment diagrams.
➢ Forward and reverse engineering.

How to Draw a Class Diagram?


Class diagrams are the most popular UML diagrams used for construction of software applications.
It is very important to learn the drawing procedure of class diagram.

Class diagrams have a lot of properties to consider while drawing but here the diagram will be
considered from a top level view.

Class diagram is basically a graphical representation of the static view of the system and represents
different aspects of the application. A collection of class diagrams represent the whole system.

The following points should be remembered while drawing a class diagram −


➢ The name of the class diagram should be meaningful to describe the aspect of the system.
➢ Each element and their relationships should be identified in advance.
➢ Responsibility (attributes and methods) of each class should be clearly identified
➢ For each class, a minimum number of properties should be specified, as unnecessary
properties will make the diagram complicated.
➢ Use notes whenever required to describe some aspect of the diagram. At the end of the
drawing it should be understandable to the developer/coder.
➢ Finally, before making the final version, the diagram should be drawn on plain paper and
reworked as many times as possible to make it correct.

The following diagram is an example of an Order System of an application. It describes a particular


aspect of the entire application.
➢ First of all, Order and Customer are identified as the two elements of the system. They have
a one-to-many relationship because a customer can have multiple orders.
➢ Order class is an abstract class and it has two concrete classes (inheritance relationship)
Special-order and Normal Order.
➢ The two inherited classes have all the properties as the Order class. In addition, they have
additional functions like dispatch () and receive ().

The following class diagram has been drawn considering all the points mentioned above.

Page No. 10
SE Lab, BE (CSE), Dept. of CSE, MVSREC

Where to Use Class Diagrams?


Class diagram is a static diagram and it is used to model the static view of a system. The static
view describes the vocabulary of the system.
Class diagrams are also considered as the foundation for component and deployment diagrams.
Class diagrams are not only used to visualize the static view of the system but they are also used
to construct the executable code for forward and reverse engineering of any system.
Generally, UML diagrams are not directly mapped with any object-oriented programming
languages but the class diagram is an exception.
Class diagram clearly shows the mapping with object-oriented languages such as Java, C++, etc.
From practical experience, class diagrams are generally used for construction purposes.
In a nutshell it can be said, class diagrams are used for −
➢ Describing the static view of the system.
➢ Showing the collaboration among the elements of the static view.
➢ Describing the functionalities performed by the system.
➢ Construction of software applications using object oriented languages.

1.3.4. State chart diagram


The name of the diagram itself clarifies the purpose of the diagram and other details. It describes
different states of a component in a system. The states are specific to a component/object of a
system.
A State chart diagram describes a state machine. State machine can be defined as a machine which
defines different states of an object and these states are controlled by external or internal events.
Activity diagram explained in the next chapter, is a special kind of a Statechart diagram. As the
State chart diagram defines the states, it is used to model the lifetime of an object.

Purpose of State chart Diagrams


State chart diagram is one of the five UML diagrams used to model the dynamic nature of a system.
They define different states of an object during its lifetime and these states are changed by events.
State chart diagrams are useful to model the reactive systems. Reactive systems can be defined as
a system that responds to external or internal events.
State chart diagram describes the flow of control from one state to another state. States are defined
as a condition in which an object exists and it changes when some event is triggered. The most
important purpose of a state chart diagram is to model the lifetime of an object from creation to
termination.
state chart diagrams are also used for forward and reverse engineering of a system. However, the
Page No. 11
SE Lab, BE (CSE), Dept. of CSE, MVSREC

main purpose is to model the reactive system.


Following are the main purposes of using Statechart diagrams −
➢ To model the dynamic aspect of a system.
➢ To model the lifetime of a reactive system.
➢ To describe different states of an object during its lifetime.
➢ Define a state machine to model the states of an object.

How to draw a state chart Diagram?


State chart diagram is used to describe the states of different objects in its life cycle. Emphasis is
placed on the state changes upon some internal or external events. These states of objects are
important to analyze and implement them accurately.
State chart diagrams are very important for describing the states. States can be identified as the
condition of objects when a particular event occurs.
Before drawing a state chart diagram we should clarify the following points −
➢ Identify the important objects to be analyzed.
➢ Identify the states.
➢ Identify the events.
Following is an example of a state chart diagram where the state of Order object is analyzed
The first state is an idle state from where the process starts. The next states are arrived for events
like send request, confirm request, and dispatch order. These events are responsible for the state
changes of order objects.
During the life cycle of an object (here order object) it goes through the following states and there
may be some abnormal exits. This abnormal exit may occur due to some problem in the system.
When the entire life cycle is complete, it is considered as a complete transaction as shown in the
following figure. The initial and final state of an object is also shown in the following figure.

Where to Use state chart Diagrams?


From the above discussion, we can define the practical applications of a Statechart diagram. state
chart diagrams are used to model the dynamic aspect of a system like other four diagrams discussed
in this tutorial. However, it has some distinguishing characteristics for modeling the dynamic
nature.
State chart diagrams define the states of a component and these state changes are dynamic in nature.
Its specific purpose is to define the state changes triggered by events. Events are internal or external
factors influencing the system.
State chart diagrams are used to model the states and also the events operating on the system. When
Page No. 12
SE Lab, BE (CSE), Dept. of CSE, MVSREC

implementing a system, it is very important to clarify different states of an object during its lifetime
and state chart diagrams are used for this purpose. When these states and events are identified, they
are used to model it and these models are used during the implementation of the system.
If we look into the practical implementation of the Statechart diagram, then it is mainly used to
analyze the object states influenced by events. This analysis is helpful to understand the system
behavior during its execution.
The main usage can be described as −
➢ To model the object states of a system.
➢ To model the reactive system. Reactive system consists of reactive objects.
➢ To identify the events responsible for state changes.
➢ Forward and reverse engineering.

1.3.5. Activity diagram


Activity diagram is another important diagram in UML to describe the dynamic aspects of the
system.
Activity diagram is basically a flowchart to represent the flow from one activity to another activity.
The activity can be described as an operation of the system.
The control flow is drawn from one operation to another. This flow can be sequential, branched,
or concurrent. Activity diagrams deal with all type of flow control by using different elements such
as fork, join, etc.

Purpose of Activity Diagrams


The basic purpose of activity diagrams is similar to the other four diagrams. It captures the dynamic
behavior of the system. Other four diagrams are used to show the message flow from one object
to another but the activity diagram is used to show message flow from one activity to another.
Activity is a particular operation of the system. Activity diagrams are not only used for visualizing
the dynamic nature of a system, but they are also used to construct the executable system by using
forward and reverse engineering techniques. The only missing thing in the activity diagram is the
message part.
It does not show any message flow from one activity to another. Activity diagram is sometimes
considered as the flowchart. Although the diagrams look like a flowchart, they are not. It shows
different flows such as parallel, branched, concurrent, and single.
The purpose of an activity diagram can be described as −
➢ Draw the activity flow of a system.
➢ Describe the sequence from one activity to another.
➢ Describe the parallel, branched and concurrent flow of the system.

How to Draw an Activity Diagram?


Activity diagrams are mainly used as a flowchart that consists of activities performed by the
system. Activity diagrams are not exactly flowcharts as they have some additional capabilities.
These additional capabilities include branching, parallel flow, swimlane, etc.
Before drawing an activity diagram, we must have a clear understanding about the elements used
in activity diagram. The main element of an activity diagram is the activity itself. An activity is a
function performed by the system. After identifying the activities, we need to understand how they
are associated with constraints and conditions.
Before drawing an activity diagram, we should identify the following elements −
➢ Activities
➢ Association
➢ Conditions
➢ Constraints
Once the above-mentioned parameters are identified, we need to make a mental layout of the entire
flow. This mental layout is then transformed into an activity diagram.
Following is an example of an activity diagram for an order management system. In the diagram,
Page No. 13
SE Lab, BE (CSE), Dept. of CSE, MVSREC

four activities are identified which are associated with conditions. One important point should be
clearly understood that an activity diagram cannot be exactly matched with the code. The activity
diagram is made to understand the flow of activities and is mainly used by the business users
Following diagram is drawn with the four main activities −
➢ Send order by the customer
➢ Receipt of the order
➢ Confirm the order
➢ Dispatch the order
After receiving the order request, condition checks are performed to check if it is normal or special
order. After the type of order is identified, dispatch activity is performed and that is marked as the
termination of the process.

Where to Use Activity Diagrams?


The basic usage of activity diagram is similar to other four UML diagrams. The specific usage is
to model the control flow from one activity to another. This control flow does not include
messages.
Activity diagram is suitable for modeling the activity flow of the system. An application can have
multiple systems. Activity diagram also captures these systems and describes the flow from one
system to another. This specific usage is not available in other diagrams. These systems can be
database, external queues, or any other system.
We will now look into the practical applications of the activity diagram. From the above
discussion, it is clear that an activity diagram is drawn from a very high level. So it gives a high
level view of a system. This high level view is mainly for business users or any other person who
is not a technical person.
This diagram is used to model the activities which are nothing but business requirements. The
diagram has more impact on business understanding rather than on implementation details.
Activity diagram can be used for −
➢ Modeling workflow by using activities.
➢ Modeling business requirements.
➢ High level understanding of the system's functionalities.
➢ Investigating business requirements at a later stage.

Page No. 14
SE Lab, BE (CSE), Dept. of CSE, MVSREC

INTERACTION DIAGRAMS

The diagrams are used to describe some type of interactions among the different elements in the
model. This interaction is a part of dynamic behavior of the system.
This interactive behavior is represented in UML by two diagrams known as Sequence diagram and
Collaboration diagram. The basic purpose of both the diagrams are similar.
Sequence diagram emphasizes on time sequence of messages and collaboration diagram
emphasizes on the structural organization of the objects that send and receive messages.
Purpose of Interaction Diagrams
The purpose of interaction diagrams is to visualize the interactive behavior of the system.
Visualizing the interaction is a difficult task. Hence, the solution is to use different types of models
to capture the different aspects of the interaction.
Sequence and collaboration diagrams are used to capture the dynamic nature but from a different
angle.
The purpose of interaction diagram is −
● To capture the dynamic behavior of a system.
● To describe the message flow in the system.
● To describe the structural organization of the objects.
● To describe the interaction among objects.
How to Draw an Interaction Diagram?
As we have already discussed, the purpose of interaction diagrams is to capture the dynamic aspect
of a system. So to capture the dynamic aspect, we need to understand what a dynamic aspect is and
how it is visualized. Dynamic aspect can be defined as the snapshot of the running system at a
particular moment
We have two types of interaction diagrams in UML. One is the sequence diagram and the other is
the collaboration diagram. The sequence diagram captures the time sequence of the message flow
from one object to another and the collaboration diagram describes the organization of objects in
a system taking part in the message flow.
Following things are to be identified clearly before drawing the interaction diagram
● Objects taking part in the interaction.
● Message flows among the objects.
● The sequence in which the messages are flowing.
● Object organization.

1.3.6. Collaboration diagram


It shows the object organization as seen in the following diagram. In the collaboration diagram,
the method call sequence is indicated by some numbering technique. The number indicates how
the methods are called one after another. We have taken the same order management system to
describe the collaboration diagram.
Method calls are similar to that of a sequence diagram. However, the difference being the sequence
diagram does not describe the object organization, whereas the collaboration diagram shows the
object organization.
To choose between these two diagrams, emphasis is placed on the type of requirement. If the time
sequence is important, then the sequence diagram is used. If organization is required, then a
collaboration diagram is used.

Page No. 15
SE Lab, BE (CSE), Dept. of CSE, MVSREC

1.3.7. Sequence diagram


The sequence diagram has four objects (Customer, Order, Special-order and Normal Order).
The following diagram shows the message sequence for the Special-order object and the same can
be used in the case of the Normal Order object. It is important to understand the time sequence of
message flows. The message flow is nothing but a method call of an object.
The first call is send Order () which is a method of Order object. The next call is confirm () which
is a method of the Special-order object and the last call is Dispatch () which is a method of the
Special-order object. The following diagram mainly describes the method calls from one object to
another, and this is also the actual scenario when the system is running.

Where to Use Interaction Diagrams?


We have already discussed that interaction diagrams are used to describe the dynamic nature of a
system. Now, we will look into the practical scenarios where these diagrams are used. To
understand the practical application, we need to understand the basic nature of sequence and
collaboration diagrams.
Page No. 16
SE Lab, BE (CSE), Dept. of CSE, MVSREC

The main purpose of both the diagrams are similar as they are used to capture the dynamic behavior
of a system. However, the specific purpose is more important to clarify and understand.
Sequence diagrams are used to capture the order of messages flowing from one object to another.
Collaboration diagrams are used to describe the structural organization of the objects taking part
in the interaction. A single diagram is not sufficient to describe the dynamic aspect of an entire
system, so a set of diagrams are used to capture it as a whole.
Interaction diagrams are used when we want to understand the message flow and the structural
organization. Message flow means the sequence of control flow from one object to another.
Structural organization means the visual organization of the elements in a system.
Interaction diagrams can be used −
➢ To model the flow of control by time sequence.
➢ To model the flow of control by structural organizations.
➢ For forward engineering.
➢ For reverse engineering.

1.3.8. Component diagram


Component diagrams are different in terms of nature and behavior. Component diagrams are used
to model the physical aspects of a system. Now the question is, what are these physical aspects?
Physical aspects are the elements such as executables, libraries, files, documents, etc. which reside
in a node.
Component diagrams are used to visualize the organization and relationships among components
in a system. These diagrams are also used to make executable systems.

Purpose of Component Diagrams


Component diagram is a special kind of diagram in UML. The purpose is also different from all
other diagrams discussed so far. It does not describe the functionality of the system but it describes
the components used to make those functionalities.
Thus from that point of view, component diagrams are used to visualize the physical components
in a system. These components are libraries, packages, files, etc.
Component diagrams can also be described as a static implementation view of a system. Static
implementation represents the organization of the components at a particular moment.
A single component diagram cannot represent the entire system but a collection of diagrams is
used to represent the whole.
The purpose of the component diagram can be summarized as −
➢ Visualize the components of a system.
➢ Construct executables by using forward and reverse engineering.
➢ Describe the organization and relationships of the components.

How to Draw a Component Diagram?


Component diagrams are used to describe the physical artifacts of a system. This artifact includes
files, executables, libraries, etc
The purpose of this diagram is different. Component diagrams are used during the implementation
phase of an application. However, it is prepared well in advance to visualize the implementation
details.
Initially, the system is designed using different UML diagrams and then when the artifacts are
ready, component diagrams are used to get an idea of the implementation.
This diagram is very important as without it the application cannot be implemented efficiently. A
well-prepared component diagram is also important for other aspects such as application
performance, maintenance, etc.
Before drawing a component diagram, following artifacts are to be identified clearly −
➢ Files used in the system.
➢ Libraries and other artifacts relevant to the application.
➢ Relationships among the artifacts.

Page No. 17
SE Lab, BE (CSE), Dept. of CSE, MVSREC

After identifying the artifacts, the following points need to be kept in mind.
➢ Use a meaningful name to identify the component for which the diagram is to be drawn.
➢ Prepare a mental layout before producing using tools.
➢ Use notes for clarifying important points.
Following is a component diagram for order management system. Here, the artifacts are files. The
diagram shows the files in the application and their relationships. In actual, the component diagram
also contains DLLs, libraries, folders, etc.
In the following diagram, four files are identified and their relationships are produced. Component
diagram cannot be matched directly with other UML diagrams discussed so far as it is drawn for a
completely different purpose.
The following component diagram has been drawn considering all the points mentioned above.

Where to Use Component Diagrams?


We have already described that component diagrams are used to visualize the static
implementation view of a system. Component diagrams are special type of UML diagrams used
for different purposes.
These diagrams show the physical components of a system. To clarify it, we can say that
component diagrams describe the organization of the components in a system.
Organization can be further described as the location of the components in a system. These
components are organized in a special way to meet the system requirements.
As we have already discussed, those components are libraries, files, executables, etc. Before
implementing the application, these components are to be organized. This component organization
is also designed separately as a part of project execution.
Component diagrams are very important from an implementation perspective. Thus, the
implementation team of an application should have a proper knowledge of the component details
Component diagrams can be used to −
➢ Model the components of a system.
➢ Model the database schema.
➢ Model the executables of an application.
➢ Model the system's source code.

Page No. 18
SE Lab, BE (CSE), Dept. of CSE, MVSREC

1.3.9. Deployment diagram


Deployment diagrams are used to visualize the topology of the physical components of a
system, where the software components are deployed.
Deployment diagrams are used to describe the static deployment view of a system.
Deployment diagrams consist of nodes and their relationships.

Purpose of Deployment Diagrams


The term Deployment itself describes the purpose of the diagram. Deployment diagrams
are used for describing the hardware components, where software components are
deployed. Component diagrams and deployment diagrams are closely related.
Component diagrams are used to describe the components and deployment diagrams show
how they are deployed in hardware.
UML is mainly designed to focus on the software artifacts of a system. However, these two
diagrams are special diagrams used to focus on software and hardware components.
Most of the UML diagrams are used to handle logical components but deployment
diagrams are made to focus on the hardware topology of a system. Deployment diagrams
are used by the system engineers.
The purpose of deployment diagrams can be described as −
● Visualize the hardware topology of a system.
● Describe the hardware components used to deploy software components.
● Describe the runtime processing nodes.
How to Draw a Deployment Diagram?
Deployment diagram represents the deployment view of a system. It is related to the
component diagram because the components are deployed using the deployment diagrams.
A deployment diagram consists of nodes. Nodes are nothing but physical hardware used to
deploy the application.
Deployment diagrams are useful for system engineers. An efficient deployment diagram is
very important as it controls the following parameters −
➢ Performance
➢ Scalability
➢ Maintainability
➢ Portability
Before drawing a deployment diagram, the following artifacts should be identified −
➢ Nodes
➢ Relationships among nodes
Following is a sample deployment diagram to provide an idea of the deployment view of
order management system. Here, we have shown nodes as −
➢ Monitor
➢ Modem
➢ Caching server
➢ Server
The application is assumed to be a web-based application, which is deployed in a clustered
environment using server 1, server 2, and server 3. The user connects to the application
using the Internet. The control flows from the caching server to the clustered environment.
The following deployment diagram has been drawn considering all the points mentioned
above.

Page No. 19
SE Lab, BE (CSE), Dept. of CSE, MVSREC

Where to Use Deployment Diagrams?


Deployment diagrams are mainly used by system engineers. These diagrams are used to
describe the physical components (hardware), their distribution, and association.
Deployment diagrams can be visualized as the hardware components/nodes on which the
software components reside.
Software applications are developed to model complex business processes. Efficient
software applications are not sufficient to meet the business requirements. Business
requirements can be described as the need to support the increasing number of users, quick
response time, etc.
To meet these types of requirements, hardware components should be designed efficiently
and in a cost-effective way.
Now-a-days software applications are very complex in nature. Software applications can
be standalone, web-based, distributed, and mainframe-based and many more. Hence, it is
very important to design the hardware components efficiently.
Deployment diagrams can be used −
➢ To model the hardware topology of a system.
➢ To model the embedded system.
➢ To model the hardware details for a client/server system.
➢ To model the hardware details of a distributed application.
➢ For Forward and Reverse engineering.

2. Rules to connect the building blocks (Mentioned as How to draw? Within each diagram)

3. Common mechanisms of UML

Sometimes, the user might need to represent information through notations which are not available
in UML.

In such circumstances, we can use the extensibility mechanisms like stereotypes, tagged values and
constraints which are a part of common mechanisms in UML.

The four common mechanisms that apply throughout UML are:


Page No. 20
SE Lab, BE (CSE), Dept. of CSE, MVSREC

3.1.Specifications
3.2.Adornments
3.3.Common Divisions
3.4.Extensibility Mechanisms

3.1. Specifications
Specification provides a textual statement describing interesting aspects of a system
Note
A note is used to specify things like: requirements, observations, reviews,
explanations and constraints. A note may contain simple text or graphical symbols.
A note has no effect on the semantics of a model means it does not alter the meaning
of the model.

3.2. Adornments
➢ Textual/graphical items added to the basic notation of an element
➢ They are used for explicit visual representation of those aspects of an element that
are beyond the most important
Examples: The basic notation of association is line, but this could be adorned with
additional details, such as the role names and multiplicity of each end

Similarly, a class notation may highlight the most important aspects of a class, i.e.,
name, attributes and operations. To show access specifies for the attributes and
methods of a class adornments such as +, -, # are used.

3.3. Common Divisions


➢ In modeling, object-oriented systems get divided in multiple ways.
➢ For example, class vs. object, interface vs. implementation
➢ An object uses the same symbol as its class with its name underlined

Page No. 21
SE Lab, BE (CSE), Dept. of CSE, MVSREC

3.4. Extensibility Mechanisms


Extensibility mechanisms allow extending the language in controlled ways. They include
Stereotypes, Tagged Values and Constraints

Extensibility mechanisms can be classified into Stereotypes, Tagged values & Constraints.
Stereotypes
➢ Stereotypes are used to create new building blocks from existing blocks
➢ New building blocks are domain-specific
➢ Stereotypes are used to extend the vocabulary of a system
➢ Graphically represented as a name enclosed by guillemets (« »)

Tagged Values
➢ Tagged values are used to add to the information of the element (not of its
instances)
➢ Stereotypes help to create new building blocks, whereas tagged values help
to create new attributes
➢ These are commonly used to specify information relevant to code
generation, configuration management and so on
Constraints
➢ Constraints are used to create rules for the model
➢ Rules that impact the behavior of the model, and specify the conditions that
must be met
➢ Can apply to any element in the model, i.e., attributes of a class,
relationship
➢ Graphically represented as a string enclosed by braces {....} and placed
near the associated elements or connected to that elements by dependency
relationships

Page No. 22
SE Lab, BE (CSE), Dept. of CSE, MVSREC

NOTATIONS

Graphical notations used in structural things are most widely used in UML. These are considered
as the nouns of UML models.
Structural Things
Class Notation
UML class is represented by the following figure. The diagram is divided into four parts.
➢ The top section is used to name the class.
➢ The second one is used to show the attributes of the class.
➢ The third section is used to describe the operations performed by the class.
➢ The fourth section is optional to show any additional components.

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

Object Notation
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.

Interface Notation
Interface is represented by a circle as shown in the following figure. It has a name which is
generally written below the circle.

Page No. 23
SE Lab, BE (CSE), Dept. of CSE, MVSREC

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.

Collaboration Notation
Collaboration is represented by a dotted eclipse as shown in the following figure. It has a
name written inside the eclipse.

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

Use Case Notation


Use case is represented as an eclipse with a name inside it. It may contain additional
responsibilities.

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

Actor Notation
An actor can be defined as some internal or external entity that interacts with the system.

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

Page No. 24
SE Lab, BE (CSE), Dept. of CSE, MVSREC

Initial State Notation


Initial state is defined to show the start of a process. This notation is used in almost all
diagrams.

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

Final State Notation


Final state is used to show the end of a process. This notation is also used in almost all
diagrams to describe the end.

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

Active Class Notation


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

Active class is used to represent concurrency in a system.

Component Notation
A component in UML is shown in the following figure with a name inside. Additional
elements can be added wherever required.

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

Node Notation
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.

Node is used to represent the physical part of a system such as the server, network, etc.
Page No. 25
SE Lab, BE (CSE), Dept. of CSE, MVSREC

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

Interaction is used to represent the communication among the components of a system.

State Machine Notation


State machine describes the different states of a component in its life cycle. The notations
are described in the following diagram.

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.

Page No. 26
SE Lab, BE (CSE), Dept. of CSE, MVSREC

Grouping Things
Organizing the UML models is one of the most important aspects of the design. In UML,
there is only one element available for grouping and that is package.
Package Notation
Package notation is shown in the following figure and is used to wrap the components of a
system.

Annotational Things
Note Notation
This notation is shown in the following figure. These notations are used to provide
necessary information of a system.

Relationships
Dependency Notation
Dependency is an important aspect in UML elements. It describes the dependent elements
and the direction of dependency.
Dependency is represented by a dotted arrow as shown in the following figure. The arrow
head represents the independent element and the other end represents the dependent
element.

Dependency is used to represent the dependency between two elements of a system

Association Notation
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.
Association is represented by a dotted line with (without) arrows on both sides. The two
ends represent two associated elements as shown in the following figure. The multiplicity
is also mentioned at the ends (1, *, etc.) to show how many objects are associated.

Page No. 27
SE Lab, BE (CSE), Dept. of CSE, MVSREC

Association is used to represent the relationship between two elements of a system.

Generalization Notation
Generalization describes the inheritance relationship of the object-oriented world. It is a
parent and child relationship.
Generalization is represented by an arrow with a hollow arrow head as shown in the
following figure. One end represents the parent element and the other end represents the
child element.

Generalization is used to describe parent-child relationship of two elements of a system.

Extensibility Notation
All the languages (programming or modeling) have some mechanism to extend its
capabilities such as syntax, semantics, etc. UML also has the following mechanisms to
provide extensibility features.
➢ Stereotypes (Represents new elements)
➢ Tagged values (Represents new attributes)
➢ Constraints (Represents the boundaries)

Extensibility notations are used to enhance the power of the language. It is basically
additional elements used to represent some extra behavior of the system. These extra
behaviors are not covered by the standard available notations.

Page No. 28
SE Lab, BE (CSE), Dept. of CSE, MVSREC

Forward Engineering Case Study - 1: Hello World!!

USE CASE DIAGRAM

CLASS DIAGRAM

Page No. 29
SE Lab, BE (CSE), Dept. of CSE, MVSREC

COMPONENT DIAGRAM

DEPLOYMENT DIAGRAM

Page No. 30
SE Lab, BE (CSE), Dept. of CSE, MVSREC

Forward Engineering Case Study - 2: A Simple Calculator

USE-CASE DIAGRAM

CLASS DIAGRAM

Page No. 31
SE Lab, BE (CSE), Dept. of CSE, MVSREC

Page No. 32
SE Lab, BE (CSE), Dept. of CSE, MVSREC

Page No. 33
SE Lab, BE (CSE), Dept. of CSE, MVSREC

Page No. 34
SE Lab, BE (CSE), Dept. of CSE, MVSREC

Page No. 35
SE Lab, BE (CSE), Dept. of CSE, MVSREC

Forward Engineering Case Study - 3: Course Registration System (Domain: Academics)

Page No. 36
SE Lab, BE (CSE), Dept. of CSE, MVSREC

Page No. 37
SE Lab, BE (CSE), Dept. of CSE, MVSREC

Page No. 38
SE Lab, BE (CSE), Dept. of CSE, MVSREC

Page No. 39
SE Lab, BE (CSE), Dept. of CSE, MVSREC

Forward Engineering Group Case Study - 4

Title: __________________________________________

(Domain: _____________________)

Page No. 40
SE Lab, BE (CSE), Dept. of CSE, MVSREC

Page No. 41
SE Lab, BE (CSE), Dept. of CSE, MVSREC

Page No. 42
SE Lab, BE (CSE), Dept. of CSE, MVSREC

Page No. 43
SE Lab, BE (CSE), Dept. of CSE, MVSREC

Forward Engineering Group Case Study - 5

Title: __________________________________________

(Domain: _____________________)

Page No. 44
SE Lab, BE (CSE), Dept. of CSE, MVSREC

Page No. 45
SE Lab, BE (CSE), Dept. of CSE, MVSREC

Page No. 46
SE Lab, BE (CSE), Dept. of CSE, MVSREC

Page No. 47
SE Lab, BE (CSE), Dept. of CSE, MVSREC

Reverse Engineering Case Study - 1: Realizing Implementation of a GUI by NetBeans IDE

Realized CLASS DIAGRAM through Umbrello:-

Pseudo Code:-

Page No. 48
SE Lab, BE (CSE), Dept. of CSE, MVSREC

Page No. 49
SE Lab, BE (CSE), Dept. of CSE, MVSREC

Reverse Engineering Case Study - 2: Mini Notepad


(This software allows you to create, open and save simple text files.)

Realized CLASS DIAGRAM through Umbrello:-

Page No. 50
SE Lab, BE (CSE), Dept. of CSE, MVSREC

Pseudo Code:-

Page No. 51
SE Lab, BE (CSE), Dept. of CSE, MVSREC

Reverse Engineering Case Study – 3:

Title:

Description:

Realized CLASS DIAGRAM through Umbrello:-

Page No. 52
SE Lab, BE (CSE), Dept. of CSE, MVSREC

TESTING

1. Load and Stress Testing for a website using Apache J-Meter

Apache JMeter can be used as a load testing tool for analyzing and measuring the performance of
a variety of services, with a focus on web applications.

JMeter can be used as a unit-test tool for JDBC database connections, FTP, LDAP, Web Services,
JMS, HTTP, generic TCP connections and OS native processes. One can also configure JMeter as
a monitor, although this is typically considered ad hoc rather than advanced monitoring. It can be
used for some functional testing as well.

JMeter supports variable parameterization, assertions (response validation), per-thread cookies,


configuration variables and a variety of reports.

JMeter architecture is based on plugins. Most of its "out of the box" features are implemented with
plugins.

Creating a Test Case for a Website / Webpage

The test plan will simulate making requests against a website. For this example, jMeter will test
an instance of localhost. The instance URL is

Open JMeter

Add a Thread Group as Threads (Users) to the Test Plan

Page No. 53
SE Lab, BE (CSE), Dept. of CSE, MVSREC

Set number of threads to 100


Set ramp-‐up period to 1
Set loop-‐count to 10

Add a HTTP Request Sampler to the Thread Group

Configure HTTP Request as follows-


Server Name or IP = local host
Port Number = 80
Implementation = HttpClient4

Page No. 54
SE Lab, BE (CSE), Dept. of CSE, MVSREC

Add a Listener to the HTTP Request as Spline Visualizer

Click on Start to play the test case (Green Arrow Play Button in the top)

Page No. 55
SE Lab, BE (CSE), Dept. of CSE, MVSREC

Get to know about the importance of the listener through a google search

Try the various Listeners in the menu and also get to know their importance

Further Study: Building MySql Database Test Plan Using Jmeter


Ref. - http://www.tothenew.com/blog/building-mysql-database-test-plan-using-jmeter/

Page No. 56
SE Lab, BE (CSE), Dept. of CSE, MVSREC

2. Web Automation Testing Using Selenium IDE

Selenium is a portable framework for testing web applications. Selenium provides a playback
(formerly also recording) tool for authoring functional tests without the need to learn a test scripting
language (Selenium IDE).

1. Install Selenium IDE as extension in Firefox.


2. Open Selenium IDE.
3. Record new test case in a new project.
4. Give the project some name.
5. Give the base URL as http://www.google.com.
6. Selenium Starts Recording.
7. Give some search keywords to google and click search.
8. From the links that appear select a link.
9. Now stop selenium recording.
10. Give the test case some name.
11. Now click on run current test case.

Break point can be added by right clicking on any step recorded in selenium.

Control Flow
Selenium IDE comes with commands that enable you to add conditional logic and looping to your
tests.

Page No. 57
SE Lab, BE (CSE), Dept. of CSE, MVSREC

This enables you to execute commands (or a set of commands) only when certain conditions in your
application are met. Or execute command(s) repeatedly based on predefined criteria.

JavaScript Expressions
Conditions in your application are checked by using JavaScript expressions.
You can use the execute script or execute async script commands to run a snippet of JavaScript at
any point during your test and store the result in a variable. This variable can be used in a control
flow command.
You can also use JavaScript expressions directly in the control flow commands.

Available Commands
Control Flow commands work by specifying opening and closing commands to denote a set (or
block) of commands.
Here are each of the available control flow commands accompanied by their companion and/or
closing commands.
● if, else if, else, end
● times, end
● do, repeat if
● while, end
Following are examples of each.

Conditional Branching
Conditional branching enables you to change the behavior in your test.

If
This is the opening command for a conditional block.
Along with it you provide a JavaScript expression you would like to evaluate. This can consist of
variables created from prior JavaScript expressions in your test. This all goes in the target input
field of the if command.

If the expression evaluates to true then the test will execute the commands that follow it up until
the next conditional control flow command (e.g., else if, else, or end).
If the expression evaluates to false it will skip the commands that follow and jump to the next
relevant conditional control flow command (e.g., else if, else, or end).
Else if
This command is used within an if command block.
Page No. 58
SE Lab, BE (CSE), Dept. of CSE, MVSREC

Just like with if it takes a JavaScript expression in the target input field to evaluate, executing either
the command branch that follows it, or skips to the next relevant control flow command (e.g., else
or end).

else
else is the final condition you can have in an if block. When none of the prior conditions are met,
this command branch will be executed.
After it's done it will jump to the end command.

end
This command terminates the conditional command block. Without it the command block is
incomplete and you'll receive a helpful error message letting you know when trying to run your test.

Looping
Looping enables you to iterate over a given set of commands.

times
With times you can specify a number of iterations you would like to perform a set of commands.
The number goes into the target input field of the times command.
To close the times command block be sure to use the end command.

do

You start this loop with the do command, followed by the command(s) that you want executed, and
end with the repeat if command. Repeat if takes a JavaScript expression you would like to evaluate
in the target input field.
The commands after the do will be executed first and then the expression in the repeat if will be
evaluated. If the expression returns true then the test will jump back to the do command and repeat
the sequence.

Page No. 59
SE Lab, BE (CSE), Dept. of CSE, MVSREC

This will continue until either the condition returns false or the infinite loop protection is triggered
-- which defaults to 1000 attempts. You can override this default by specifying a number in the
value input field of the repeat if command.

while

With while you provide a JavaScript expression you would like to evaluate in the target input field.
If it evaluates to true the command block that follows will execute until it reaches the end command.
Once done the test will jump back to the while command and repeat the same sequence over
(checking first to see if the condition evaluates to true or false).
To close the while command block use the end command.

The loop will retry until either the condition returns false or the infinite loop protection is triggered
-- which defaults to 1000 attempts. You can override this default by specifying a number in the
value input field of the while command.

Nesting Commands

You can nest control flow commands as necessary (e.g., an if block can go inside of a while block,
and vice versa).

Page No. 60
SE Lab, BE (CSE), Dept. of CSE, MVSREC

Syntax Validation

If you're not sure if your control flow syntax is correct try running your test to see. The IDE will
spot errors in the control flow syntax and call out the specific command that is incorrect or missing.

Page No. 61
SE Lab, BE (CSE), Dept. of CSE, MVSREC

Classifier: A UML element that has Attributes


UML Glossary and Terms and Operations. Specifically, Actors, Classes,
and Interfaces.
Abstract Class - A class that will never be Collaboration: A relation between two Objects
instantiated. An instance of this class will never in a Communication Diagram, indicating that
exist. Messages can pass back and forth between the
Actor - An object or person that initiates events Objects.
the system is involved with. Communication Diagram - A diagram that
Activity: A step or action within an Activity shows how operations are done while
Diagram. Represents an action taken by the emphasizing the roles of objects.
system or by an Actor. Component: A deployable unit of code within
Activity Diagram: A glorified flowchart that the system.
shows the steps and decisions and parallel Component Diagram: A diagram that shows
operations within a process, such as an the relations between various Components and
algorithm or a business process. Interfaces.
Aggregation - Is a part of another class. Shown Concept - A noun or abstract idea to be
with a hollow diamond next to the containing included in a domain model.
class diagrams. Construction Phase - The third phase of the
Artifacts - Documents describing the output of Rational Unified Process during which several
a step in the design process. The description is iterations of functionality are built into the
graphic, textual, or some combination. system under construction. This is where the
Association - A connection between two main work is done.
elements of a Model. This might represent a Dependence: A relationship that indicates one
member variable in code, or the association Classifier knows the Attributes and Operations
between a personnel record and the person it of another Classifier, but isn't directly
represents, or a relation between two categories connected to any instance of the second
of workers, or any similar relationship. By Classifier.
default, both elements in an Association are Deployment Diagram: A diagram that shows
equal, and are aware of each other through the the relations between various Processors.
Association. An Association can also be a Domain -The part of the universe that the
Navigable Association, meaning that the source system is involved with.
end of the association is aware of the target end, Elaboration Phase - The second phase of the
but not vice versa. Rational Unified Process that allows for
Association Class: A Class that represents and additional project planning including the
adds information to the Association between iterations of the construction phase.
two other Classes. Element: Any item that appears in a Model.
Attributes - Characteristics of an object which Encapsulation - Data in objects is private.
may be used to reference other objects or save Generalization - Indicates that one class is a
object state information. subclass of another class (superclass). A hollow
Base Class: A Class which defines Attributes arrow points to the superclass.
and Operations that are inherited by a Subclass Event: In a State Diagram, this represents a
via a Generalization relationship. signal or event or input that causes the system
Branch: A decision point in an Activity to take an action or switch States.
Diagram. Multiple Transitions emerge from the Final State: In a State Diagram or an Activity
Branch, each with a Guard Condition. When Diagram, this indicates a point at which the
control reaches the Branch, exactly one Guard diagram completes.
Condition must be true; and control follows the Fork: A point in an Activity Diagram where
corresponding Transition. multiple parallel control threads begin.
Class: A category of similar Objects, all Generalization: An inheritance relationship, in
described by the same Attributes and which a Subclass inherits and adds to the
Operations and all assignment-compatible. Attributes and Operations of a Base Class.
Class Diagram - Shows the system classes and GoF - Gang of Four set of design patterns.
relationships between them.
Page No. 62
SE Lab, BE (CSE), Dept. of CSE, MVSREC

High Cohesion - A GRASP evaluative pattern Navigability: Indicates which end of a


which makes sure the class is not too complex, relationship is aware of the other end.
doing unrelated functions. Relationships can have bidirectional
Low Coupling - A GRASP evaluative pattern Navigability (each end is aware of the other) or
which measures how much one class relies on single directional Navigability (one end is
another class or is connected to another class. aware of the other, but not vice versa).
Inception Phase - The first phase of the Notation - Graphical document with rules for
Rational Unified Process that deals with the creating analysis and design methods.
original conceptualization and beginning of the Note: A text note added to a diagram to explain
project. the diagram in more detail.
Inheritance - Subclasses inherit the attributes Object - Object: In an Activity Diagram, an
or characteristics of their parent (superclass) object that receives information from Activities
class. These attributes can be overridden in the or provides information to Activities. In a
subclass. Collaboration Diagram or a Sequence Diagram,
Initial State: In a State Diagram or an Activity an object that participates in the scenario
Diagram, this indicates the point at which the depicted in the diagram. In general: one
diagram begins. instance or example of a given Classifier
Instance - A class is used like a template to (Actor, Class, or Interface).
create an object. This object is called an Package - A group of UML elements that
instance of the class. Any number of instances logically should be grouped together.
of the class may be created. Package Diagram: A Class Diagram in which
Interface: A Classifier that defines Attributes all of the elements are Packages and
and Operations that form a contract for Dependencies.
behavior. A provider Class or Component may Pattern - Solutions used to determine
elect to Realize an Interface (i.e., implement its responsibility assignment for objects to interact.
Attributes and Operations). A client Class or It is a name for a successful solution to a well-
Component may then Depend upon the known common problem.
Interface and thus use the provider without any Parameter: An argument to an Operation.
details of the true Class of the provider. Polymorphism - Same message, different
Iteration - A mini project section during which methods. Also used as a pattern.
some small piece of functionality is added to the Private: A Visibility level applied to an
project. Includes the development loop of Attribute or an Operation, indicating that only
analysis, design and coding. code for the Classifier that contains the member
Join: A point in an Activity Diagram where can access the member.
multiple parallel control threads synchronize Processor: In a Deployment Diagram, this
and rejoin. represents a computer or other programmable
Member: An Attribute or an Operation within device where code may be deployed.
a Classifier. Protected: A Visibility level applied to an
Merge: A point in an Activity Diagram where Attribute or an Operation, indicating that only
different control paths come together. code for the Classifier that contains the member
Message - A request from one object to another or for its Subclasses can access the member.
asking the object receiving the message to do Public: A Visibility level applied to an
something. This is basically a call to a method Attribute or an Operation, indicating that any
in the receiving object. code can access the member.
Method - A function or procedure in an object. Reading Direction Arrow - Indicates the
Model - The central UML artifact. Consists of direction of a relationship in a domain model.
various elements arranged in a hierarchy by Realization: Indicates that a Component or a
Packages, with the relations between elements Class provides a given Interface.
as well. Role - Used in a domain model, it is an optional
Multiplicity - Shown in a domain model and description about the role of an actor.
indicated outside concept boxes, it indicates Sequence Diagram: A diagram that shows the
object quantity relationship to quantiles of other existence of Objects over time, and the
objects. Messages that pass between those Objects over
Page No. 63
SE Lab, BE (CSE), Dept. of CSE, MVSREC

time to carry out some behavior. State chart Visibility: A modifier to an Attribute or
diagram - A diagram that shows all possible Operation that indicates what code has access to
object states. the member. Visibility levels include Public,
State: In a State Diagram, this represents one Protected, and Private.
state of a system or subsystem: what it is doing Workflow - A set of activities that produces
at a point in time, as well as the values of its some specific results
data.
State Diagram: A diagram that shows States of
a system or subsystem, Transitions between
States, and the Events that cause the
Transitions. References
Static: A modifier to an Attribute to indicate
that there's only one copy of the Attribute
shared among all instances of the Classifier. A
modifier to an Operation to indicate that the 1. OMG (Object Management Group) -
Operation stands on its own and doesn't operate https://www.omg.org/
on one specific instance of the Classifier. 2. https://developer.ibm.com/articles/an-
Stereotype: A modifier applied to a Model introduction-to-uml/
element indicating something about it which
can't normally be expressed in UML. In 3. https://www.visual-paradigm.com/guide/uml-
essence, Stereotypes allow you to define your unified-modeling-language/what-is-uml/
own "dialect" of UML. 4. https://www.tutorialspoint.com/uml/index.htm
Subclass: A Class which inherits Attributes and
Operations that are defined by a Subclass via a
Generalization relationship.
Swimlane: An element of an Activity Diagram
that indicates what parts of a system or a
domain perform particular Activities. All
Activities within a Swimlane are the
responsibility of the Object, Component, or
Actor represented by the Swimlane.
Time Boxing - Each iteration will have a time
limit with specific goals.
Transition: In an Activity Diagram, represents
a flow of control from one Activity or Branch
or Merge or Fork or Join to another. In a State
Diagram, represents a change from one State to
another.
Transition Phase - The last phase of the
Rational Unified Process during which users
are trained on using the new system and the
system is made available to users.
UML - Unified Modeling Language utilizes
text and graphic documents to enhance the
analysis and design of software projects by
allowing more cohesive relationships between
objects.
Use Case: In a Use Case Diagram, represents
an action that the system takes in response to
some requests from an Actor.
Use Case Diagram: A diagram that shows
relations between Actors and Use Cases.

Page No. 64

You might also like