Software Engineering Lecture Notes
Software Engineering Lecture Notes
• Introduction
Software: Software is (1) Instructions (computer programs) that provide desired features,
function, and performance, when
executed (2) Data structures that enable the programs to adequately manipulate
information, (3) Documents that describe the operation and use of the programs.
Characteristics of Software:
(1) Software is developed or engineered; it is not manufactured in the classical sense.
(2) Software does not “wear out”
(3) Although the industry is moving toward component-based construction, most
software continues to
be custom built.
Software Engineering:
(1) The systematic, disciplined quantifiable approach to the development, operation and
maintenance of
software; that is, the application of engineering to software.
(2) The study of approaches as in (1)
A PROCESS FRAMEWORK:
➢ Software process must be established for effective delivery of software engineering
technology.
➢ A process framework establishes the foundation for a complete software process by
identifying a small number of framework activities that are applicable to all software projects,
regardless of their size or complexity.
➢ The process framework encompasses a set of umbrella activities that are applicable across
the entire software process.
➢ Each framework activity is populated by a set of software engineering actions
➢ Each software engineering action is represented by a number of different task sets- each a
collection of software engineering work tasks, related work products, quality assurance points,
and project milestones.
In brief
"A process defines who is doing what, when, and how to reach a certain goal."
A Process Framework
- establishes the foundation for a complete software process
- identifies a small number of framework activities
- applies to all s/w projects, regardless of size/complexity.
- also, set of umbrella activities
- applicable across entire s/w process.
- Each framework activity has
- set of s/w engineering actions.
- Each s/w engineering action (e.g., design) has
PROCESS MODELS
Prescriptive process models define a set of activities, actions, tasks, milestones, and work
products that are required to engineer high-quality software. These process models are not
perfect, but they do provide a useful roadmap for software engineering work.
A prescriptive process model populates a process framework with explicit task sets for software
engineering actions.
Advantage:
It can serve as a useful process model in situations where requirements are fixed and work is to
proceed to complete in a linear manner.
The problems that are sometimes encountered when the waterfall model is applied are:
1. Real projects rarely follow the sequential flow that the model proposes. Although the linear
model can accommodate iteration, it does so indirectly. As a result, changes can cause confusion
as the project team proceeds.
2. It is often difficult for the customer to state all requirements explicitly. The waterfall model
requires this and has difficulty accommodating the natural uncertainty that exist at the beginning
of many projects.
3. The customer must have patience. A working version of the programs will not be available
until late in the project time-span. If a major blunder is undetected then it can be disastrous until
the program is reviewed.
The incremental model combines elements of the waterfall model applied in an iterative fashion.
• The incremental model delivers a series of releases called increments that provide
progressively more functionality for the customer as each increment is delivered.
• When an incremental model is used, the first increment is often a core product. That is, basic
requirements are addressed. The core product is used by the customer. As a result, a plan is
developed for the next increment.
• The plan addresses the modification of the core product to better meet the needs of the
customer and the delivery of additional features and functionality.
• This process is repeated following the delivery of each increment, until the complete product is
produced. For example, word-processing software developed using the incremental paradigm
might deliver basic file management editing, and document production functions in the first
increment; more sophisticated editing, and document production capabilities in the second
increment; spelling and grammar checking in the third increment; and advanced page layout
capability in the fourth increment.
PROTOTYPING:
Prototyping is more commonly used as a technique that can be implemented within the context
of anyone of the process model.
The prototyping paradigm begins with communication. The software engineer and customer
meet and define the overall objectives for the software, identify whatever requirements are
known, and outline areas where further definition is mandatory.
Prototyping iteration is planned quickly and modeling occurs. The quick design leads to the
construction of a prototype. The prototype is deployed and then evaluated by the customer/user.
Iteration occurs as the prototype is tuned to satisfy the needs of the customer, while at the same
time enabling the developer to better understand what needs to be done.
Context:
If a customer defines a set of general objectives for software, but does not identify detailed input,
processing, or output requirements, in such situation prototyping paradigm is best approach.
If a developer may be unsure of the efficiency of an algorithm, the adaptability of an operating
system then he can go for this prototyping method.
Advantages:
The prototyping paradigm assists the software engineer and the customer to better understand
what is to be built when requirements are fuzzy.
The prototype serves as a mechanism for identifying software requirements. If a working
The spiral model is a realistic approach to the development of large-scale systems and software.
The spiral
model uses prototyping as a risk reduction mechanism but, more importantly enables the
developer to apply the prototyping approach at any stage in the evolution of the product.
Draw Backs:
The spiral model is not a panacea. It may be difficult to convince customers that the evolutionary
approach is controllable. It demands considerable risk assessment expertise and relies on this
expertise for success. If a major risk is not uncovered and managed, problems will undoubtedly
occur.
Functional requirements
The functional requirements for a system describe what the system should do.
These requirements depend on the type of software being developed, the expected
users of the software, and the general approach taken by the organization when
writing requirements. When expressed as user requirements, functional
requirements are usually described in an abstract way that can be understood by
system users. However, more specific functional system requirements describe the
system functions, its inputs and outputs, exceptions, etc., in detail.
Non-functional requirements
Non-functional requirements, as the name suggests, are requirements that are not
directly concerned with the specific services delivered by the system to its users.
They may relate to emergent system properties such as reliability, response time,
and store occupancy. Alternatively, they may define constraints on the system
implementation such as the capabilities of I/O devices or the data representations
used in interfaces with other systems. Non-functional requirements, such as
performance, security, or availability, usually specify or constrain characteristics of
the system as a whole. Non-functional requirements are often more critical than
individual functional requirements. System users can usually find ways to work
around a system function that doesn’t really meet their needs. However, failing to
meet a non-functional requirement can mean that the whole system is unusable. For
example, if an aircraft system does not meet its reliability requirements, it will not
be certified as safe for operation; if an embedded control system fails to meet its
performance requirements, the control functions will not operate correctly.
Although it is often possible to identify which system components implement
specific functional requirements (e.g., there may be formatting components that
implement reporting requirements), it is often more difficult to relate components
to non-functional requirements. The implementation of these requirements may be
diffused throughout the system. There are two reasons for this:
1. Non-functional requirements may affect the overall architecture of a system
rather than the individual components. For example, to ensure that performance
requirements are met, you may have to organize the system to minimize
communications between components.
2. A single non-functional requirement, such as a security requirement, may
generate a number of related functional requirements that define new system
services that are required. In addition, it may also generate requirements that
restrict existing requirements.
The UML is a graphical language for visualizing, specifying, constructing, and documenting the artifacts
of a software-intensive system. The UML gives you a standard way to write a system's blueprints,
covering conceptual things, such as business processes and system functions, as well as concrete things,
such as classes written in a specific programming language, database schemas, and reusable software
components.
Model
A model is a simplification of reality. A model provides the blueprints of a system. A model may be
structural, emphasizing the organization of the system, or it may be behavioral, emphasizing the
dynamics of the system.
Why do we model
We build models so that we can better understand the system we are developing.
We build models of complex systems because we cannot comprehend such a system in its entirety.
An Overview of UML
• The Unified Modeling Language is a standard language for writing software blueprints. The UML
may be used to visualize, specify, construct, and document the artifacts of a software-intensive
system.
• The UML is appropriate for modeling systems ranging from enterprise information systems to
distributed Web-based applications and even to hard real time embedded systems. It is a very
expressive language, addressing all the views needed to develop and then deploy such systems.
The UML is a language for
• Visualizing
• Specifying
• Constructing
• Documenting
• Visualizing The UML is more than just a bunch of graphical symbols. Rather, behind each symbol
in the UML notation is a well-defined semantics. In this manner, one developer can write a model in
the UML, and another developer, or even another tool, can interpret that model unambiguously
• Specifying means building models that are precise, unambiguous, and complete.
• Constructing the UML is not a visual programming language, but its models can be directly
connected to a variety of programming languages
• Documenting a healthy software organization produces all sorts of artifacts in addition to raw
executable code. These artifacts include
o Requirements
o Architecture
o Design
o Source code
o Project plans
o Tests
o Prototypes
o Releases
To understand the UML, you need to form a conceptual model of the language, and this requires
learning three major elements:
1. Things
2. Relationships
3. Diagrams
Things in the UML
1 Structural things
2 Behavioral things
3 Grouping things
4 Annotational things
Structural things are the nouns of UML models. These are the mostly static parts of a model,
representing elements that are either conceptual or physical. In all, there are seven kinds of structural
things.
1. Classes
2. Interfaces
3. Collaborations
4. Use cases
5. Active classes
6. Components
7. Nodes
Class is a description of a set of objects that share the same attributes, operations, relationships, and
semantics. A class implements one or more interfaces. Graphically, a class is rendered as a rectangle,
usually including its name, attributes, and operations.
Interface
An interface is rendered as a circle together with its name. An interface rarely stands alone. Rather, it is
typically attached to the class or component that realizes the interface
Collaboration defines an interaction and is a society of roles and other elements that work together to
provide some cooperative behavior that's bigger than the sum of all the elements. Therefore,
collaborations have structural, as well as behavioral, dimensions. A given class might participate in
several collaborations.
Graphically, collaboration is rendered as an ellipse with dashed lines, usually including only its name
Usecase
• Use case is a description of set of sequence of actions that a system performs that yields an
observable result of value to a particular actor
• Use case is used to structure the behavioral things in a model.
• A use case is realized by collaboration. Graphically, a use case is rendered as an ellipse with solid
lines, usually including only its name
Active class is just like a class except that its objects represent elements whose behavior is concurrent
with other elements. Graphically, an active class is rendered just like a class, but with heavy lines, usually
including its name, attributes, and operations
Component is a physical and replaceable part of a system that conforms to and provides the realization
of a set of interfaces. Graphically, a component is rendered as a rectangle with tabs
Node is a physical element that exists at run time and represents a computational resource, generally
having at least some memory and, often, processing capability. Graphically, a node is rendered as a
cube, usually including only its name
Behavioral Things
are the dynamic parts of UML models. These are the verbs of a model, representing behavior over time
and space. In all, there are two primary kinds of behavioral things
1 Interaction
2 state machine
Interaction
Interaction is a behavior that comprises a set of messages exchanged among a set of objects within a
particular context to accomplish a specific purpose
An interaction involves a number of other elements, including messages, action sequences and links
Graphically a message is rendered as a directed line, almost always including the name of its operation
State Machine
State machine is a behavior that specifies the sequences of states an object or an interaction goes
through during its lifetime in response to events, together with its responses to those events
State machine involves a number of other elements, including states, transitions, events and activities
Graphically, a state is rendered as a rounded rectangle, usually including its name and its sub states
Grouping Things:-
1. are the organizational parts of UML models. These are the boxes into which a model can be
decomposed
2. There is one primary kind of grouping thing, namely, packages.
Package:-
• A package is a general-purpose mechanism for organizing elements into groups. Structural things,
behavioral things, and even other grouping things may be placed in a package
• Graphically, a package is rendered as a tabbed folder, usually including only its name and,
sometimes, its contents
Annotational things are the explanatory parts of UML models. These are the comments you may apply
to describe about any element in a model.
1 A note is simply a symbol for rendering constraints and comments attached to an element or a
collection of elements.
2 Graphically, a note is rendered as a rectangle with a dog-eared corner, together with a textual or
graphical comment
1. Dependency
2. Association
3. Generalization
4. Realization
Dependency:-
1 Dependency is a semantic relationship between two things in which a change to one thing may
affect the semantics of the other thing
2 Graphically a dependency is rendered as a dashed line, possibly directed, and occasionally
including a label
Association is a structural relationship that describes a set of links, a link being a connection among
objects.
Graphically an association is rendered as a solid line, possibly directed, occasionally including a label,
and often containing other adornments, such as multiplicity and role names
Aggregation is a special kind of association, representing a structural relationship between a whole and
its parts. Graphically, a generalization relationship is rendered as a solid line with a hollow arrowhead
pointing to the parent
Generalization
in which objects of the specialized element (the child) are more specific than the objects of the
generalized element.
Realization is a semantic relationship between classifiers, wherein one classifier specifies a contract that
another classifier guarantees to carry out. Graphically a realization relationship is rendered as a cross
between a generalization and a dependency relationship
• Diagram is the graphical presentation of a set of elements, most often rendered as a connected
graph of vertices (things) and arcs (relationships).
• In theory, a diagram may contain any combination of things and relationships.
• For this reason, the UML includes nine such diagrams:
• Class diagram
• Object diagram
• Use case diagram
• Sequence diagram
• Collaboration diagram
• State chart diagram
• Activity diagram
• Component diagram
• Deployment diagram
Class diagram
A class diagram shows a set of classes, interfaces, and collaborations and their relationships.
Object diagram
• Object diagrams represent static snapshots of instances of the things found in class diagrams
• These diagrams address the static design view or static process view of a system
• An object diagram shows a set of objects and their relationships
• A use case diagram shows a set of use cases and actors and their relationships
• Use case diagrams address the static use case view of a system.
• These diagrams are especially important in organizing and modeling the behaviors of a system.
Interaction Diagrams
Both sequence diagrams and collaboration diagrams are kinds of interaction diagrams
Sequence diagrams and collaboration diagrams are isomorphic, meaning that you can take one and
transform it into the other
• A state chart diagram shows a state machine, consisting of states, transitions, events, and
activities
• State chart diagrams address the dynamic view of a system
• They are especially important in modeling the behavior of an interface, class, or collaboration
and emphasize the event-ordered behavior of an object
Activity diagram
1 An activity diagram is a special kind of a state chart diagram that shows the flow from activity to
activity within a system
2 Activity diagrams address the dynamic view of a system
3 They are especially important in modeling the function of a system and emphasize the flow of
control among objects
Component diagram
• A component diagram shows the organizations and dependencies among a set of components.
• Component diagrams address the static implementation view of a system
• They are related to class diagrams in that a component typically maps to one or more classes,
interfaces, or collaborations
Deployment diagram
• A deployment diagram shows the configuration of run-time processing nodes and the
components that live on them
• Deployment diagrams address the static deployment view of an architecture
Case study:
LIBRARY MANAGEMENT SYSTEM
To model the library management system using ‘Object Oriented Analysis and Designing’
concept and the unified modeling language (UML) objective behind the development of this software is
to model an object oriented system which helps the librarians to easily performs their activities. It must
as a best interface between the librarian and the computer so as to perform the required activities
effectively. It must cover the activities of maintaining the records of issued and received books and
Other things available in the library separately for both faculty and student when by taking the
scenario as a college. Uml diagrams drew below helps us to easily understand how the software is
developed. The diagrams are use-case, sequence, collaborations, class, and activity diagrams.
A use case diagram is a diagram that shows a set of use cases and actors and their relationships.
▪ Use cases
▪ Actors
▪ Dependency, generalization, and association relationships
Common Uses
• We apply use case diagrams to model the static use case view of a system. This view primarily
supports the behavior of a system
o To model the requirements of a system
Modeling the requirements of a system involves specifying what that system should do (from a point of
view of outside the system), independent of how that system should do it. Here, you'll apply use case
diagrams to specify the desired behavior of the system.
11 Extend Specifies that the target use case extends the behavior of the source
Specifies that the source use case explicitly incorporates the behavior of
12 Include another use case at a location specified by the source
INTERACTION DIAGRAM
An interaction diagram models the dynamic aspects of the system by showing the relationship
among the objects and message they may dispatch. There are two types of interaction diagrams:
1. Sequence diagram
2. collaborationdiagram
SEQUENCE DIAGRAM
Sequence diagram shows the steps to steps what much happen to accomplish a piece of functionality
provided by the system. The components are:
a) Actors
b) Objects
c) Message
d) Lifeline
e) Focus of Control
Sequence diagram for “validate user” scenario
1. User
2. LibEmp
3. UserDB
2. book found
4. User
5. LibEmp
6. Catalog
7. IssueRegiter
COLLABORATION DIAGRAM
Collaboration diagrams displays object interactions organized around object and their links to one
another. The components are:
a) Actor
b) Object
c) Link
d)
Collaboration diagram for “validate user” scenario
collaboration diagram for issue book scenario
Class Diagrams
• A class diagram shows a set of classes, interfaces, and collaborations and their relationships.
• Graphically, a class diagram is a collection of vertices and arcs.
Contents
Note: Component diagrams and deployment diagrams are similar to class diagrams, except that instead
of containing classes, they contain components and nodes
Activity Diagrams
o An activity diagram shows the flow from activity to activity. An is an ongoing nonatomic execution
within a state machine.
o Activities ultimately result in some action, which is made up of executable atomic computations that
result in a change in state of the system or the return of a value.
o Actions encompass calling another operation, sending a signal, creating or destroying an object, or
some pure computation, such as evaluating an expression.
o Graphically, an activity diagram is a collection of vertices and arcs.
Contents
o Executable, atomic computations are called action states because they are states of the system,
each representing the execution of an action.
o We represent an action state using a lozenge shape (a symbol with horizontal top and bottom and
convex sides). Inside that shape, you may write any expression.
o Action states can't be decomposed. Furthermore, action states are atomic, meaning that events may
occur, but the work of the action state is not interrupted.
o Finally, the work of an action state is generally considered to take insignificant execution time.
Transitions
o When the action or activity of a state completes, flow of control passes immediately to the next
action or activity state.
o We specify this flow by using transitions to show the path from one action or activity state to the
next action or activity state.
o In the UML, you represent a transition as a simple directed line
Branching
o As in a flowchart, you can include a branch, which specifies alternate paths taken based on some
Boolean expression.
o We represent a branch as a diamond. A branch may have one incoming transition and two or more
outgoing ones.
• To model a workflow,
o Establish a focus for the workflow. For nontrivial systems, it's impossible to show all
interesting workflows in one diagram.
o Select the business objects that have the high-level responsibilities for parts of the overall
workflow. These may be real things from the vocabulary of the system, or they may be more
abstract. In either case, create a swimlane for each important business object.
o Identify the preconditions of the workflow's initial state and the postconditions of the
workflow's final state. This is important in helping you model the boundaries of the
workflow.
o Beginning at the workflow's initial state, specify the activities and actions that take place
over time and render them in the activity diagram as either activity states or action states.
o For complicated actions, or for sets of actions that appear multiple times, collapse these into
activity states, and provide a separate activity diagram that expands on each.
Modeling a Workflow