Software Engineering - All Lessons
Software Engineering - All Lessons
Software Engineering 1
COURSE OUTLINE
Lesson 1
INTRODUCTION
What is Software Engineering?
4
Solve Problems
Software products are large and complex
Development requires analysis and
synthesis
– Analysis: decompose a large problem into smaller, understandable
pieces
• abstraction is the key
– Synthesis: build (compose) a software from smaller building blocks
• composition is challenging
What is Software Engineering?
5
Building a System
Requirement analysis and definition
System design
Program design
Writing the programs
Unit testing
Integration testing
System testing
System delivery
Maintenance
Software Engineering Process
Structured set of activities required to develop a
software system
Specification
Design
Validation
Evolution
Generic products:
Stand-alone systems which are produced by a
development organization and sold on the open market
to any customer.
Customized products:
Systems which are commissioned by a specific
customer and developed specially by some contractor.
Software Products Attributes
24
Maintainability
Dependability
Efficiency
Usability
Complex complicated
Lesson 2
1. Poor planning,
2. Lack of leadership,
3. Inadequate knowledge,
4. People problems,
5. Lifecycle problems.
Reason 1: Poor Planning
30
− Lack of communication.
− Not breaking down development into phases or steps.
− Not prioritizing operational activities, objectives.
− Not obtaining stakeholder approval.
− No business plan or inadequate business plan.
− Unrealistic expectations set, e.g., financial investment,
time required, set-up costs.
− Inadequate funding/capital or poor use of funds/capital.
− Lack of time commitment.
− Unrealistic scheduling.
Reason 2: Lack of Leadership
31
1. Lack of clear links between the project and the organization's key
strategic priorities, including agreed measures of success.
2. Lack of clear senior management ownership and leadership.
3. Lack of effective engagement with project stakeholders.
4. Lack of skills and proven approach to project management and risk
management.
5. Too little attention to breaking developments and implementation into
manageable steps.
6. Evaluation of proposals driven by initial price rather than long-term
value for money (especially securing delivery of business benefits).
7. Lack of understanding of, and contact with the industry at senior levels
in the organization.
8. Lack of effective project team integration between clients, the supplier
team and the supply/resource chain.
8 Common Issues To Address: Issue #1
36
1. Lack of clear links between the project and the organization's key strategic
priorities, including agreed measures of success.
Do we know how the priority of this project compares and aligns with our other
delivery and operational activities?
Have we defined the critical success factors (CSFs) for the project?
Have the CSFs been agreed to by suppliers and key stakeholders?
Do we have a clear project plan that covers the full period of the planned delivery
and all business change required, and indicates the means of benefits realization?
Is the project founded upon realistic timescales, taking account of statutory lead-
times, and showing critical dependencies such that any delays can be handled?
Are the lessons learned from relevant projects being applied?
Has an analysis been undertaken of the effects of any slippage in time, cost, scope or
quality? In the event of a problem/conflict at least one must be sacrificed.
8 Common Issues To Address: Issue #2
(Slide 1 of 2)
37
Does the project management team have a clear view of the interdependencies
between projects, the benefits, and the criteria against which success will be
judged?
If the project traverses organizational boundaries, are there clear governance
arrangements to ensure sustainable alignment with the business objectives of all
organizations involved?
Are all proposed commitments and announcements first checked for delivery
implications?
Are decisions taken early, decisively, and adhered to, in order to facilitate
successful delivery?
8 Common Issues To Address: Issue #2
(Slide 2 of 2)
38
Is there a skilled and experienced project team with clearly defined roles and
responsibilities? If not, is there access to expertise, which can benefit those
fulfilling the requisite roles?
Are the major risks identified, weighted and treated by the SRO, the Director, and
Project Manager and/or project team?
Has sufficient resourcing, financial and otherwise, been allocated to the project,
including an allowance for risk?
Do we have adequate approaches for estimating, monitoring and controlling the
total expenditure on projects?
8 Common Issues To Address: Issue
41
#4 (Slide 2 of 2)
Do we have effective systems for measuring and tracking the
realization of benefits in the business case?
Are the governance arrangements robust enough to ensure that
"bad news" is not filtered out of progress reports to senior
managers until an adequate resolution is highlighted?
If external consultants (subcontractors) are used, are they
accountable and committed to help ensure successful and
timely delivery?
8 Common Issues To Address: Issue #5
42
Has the approach been tested to ensure it is appropriate in scope (e.g. in IT-enabled
projects)?
Has sufficient time been built-in to allow for planning applications in Property &
Construction projects for example?
Have we done our best to keep delivery timescales short so that change during
development is avoided?
Have enough review points been built-in so that the project can be stopped, if
changing circumstances mean that the business benefits are no longer achievable
or no longer represent value for money?
Is there a business continuity plan in the event of the project delivering late or
failing to deliver at all?
8 Common Issues To Address: Issue #6
43
7. Lack of understanding of, and contact with the industry at senior levels in
the organization.
Have we tested that the industry understands our approach and agrees that it is
achievable?
Have we asked suppliers to state any assumptions they are making against their
proposals?
Have we checked that the project will attract sufficient competitive interest?
Is senior management sufficiently engaged with the industry to be able to assess
supply-side risks?
Do we have a clear strategy for engaging with the industry or are we making
sourcing decisions on a piecemeal basis?
8 Common Issues To Address: Issue #7
(Slide 2 of 2)
45
Are the processes in place to ensure that all parties have a clear
understanding of their roles and responsibilities, and a shared
understanding of desired outcomes, key terms and deadlines?
Do we understand the dynamics of the industry to determine
whether our acquisition requirements can be met, given
potentially competing pressures in other sectors of the
economy?
8 Common Issues To Address: Issue #8
46
Lesson 3
SOFTWARE DEVELOPMENT
METHODOLOGIES
DEFINITION OF TERMS
Tools
Methodologies
Principle
1.51
Software Development Lifecycle Model
Definition.
A (software/system) lifecycle model is a description
of the sequence of activities carried out in an SE
project, and the relative order of these activities.
Software Lifecycle Models
A software lifecycle model is a standardised
format for
planning
organising, and
Running a new development project.
Many are minor variations on just a small number of basic models. In this
section we:
project plan =
lifecycle model + project parameters
Software Development Lifecycle Model
Initial
Specification
version
Outline Intermediate
Development
description versions
Final
Validation
version
Generic Software Process Models
Following Software Development Life Cycles will be
discussed;
Waterfall
Code and Fix
Iterative or Incremental
Spiral Model
Rapid Prototyping
Agile (XP)
V-Model
COTS
Waterfall Method
Unidirectional, no way back finish this step before moving to the next
Unidirectional, finish this step before moving to the next
59
The Waterfall Model
1. No administrative overhead
2. Signs of progress (code) early.
3. Low expertise, anyone can use it!
4. Useful for small “proof of concept” projects, e.g.
as part of risk reduction.
Code-and-Fix Disadvantages
1. Dangerous!
1. No visibility/control
2. No resource planning
3. No deadlines
4. Mistakes hard to detect/correct
2. Impossible for large projects,
communication breakdown, chaos.
Iterative Development
In practice, development is always iterative, and all activities
progress in parallel.
1.68
Iterative Development
Advantages of Iterative model:
A high-level design of the application is created before building
the product and defining the design solution for the entire
product.
Analysis
Design
Implementation
Test
1.71
Boehm’s Spiral Lifecycle
1.72
Cumulative cost Evaluate alternatives,
Determine objectives, Identify & resolve risks
alternatives & constraints
Prototypes Operational
Review & Start P1 P2 P3 Prototype
commitment RequirementsConcept
Design, Detailed design
plan Of Operation Validation
Development & Verification
plan Requirements
validation Coding
Integration &
Test plan Unit & Integration
Testing
End Acceptance Develop & verify
Plan next phase
Testing next-level product
Spiral Model
Disadvantages
Can be a costly model to use.
Risk analysis requires highly specific expertise.
Project’s success is highly dependent on the risk analysis phase.
Doesn’t work well for smaller projects.
Requires risk assessment expertise.
Contractual development often specifies process model and
deliverables in advance.
Spiral Model Disadvantages
Needs technical expertise in risk analysis to
really work
Model is poorly understood by non-technical
management, hence not so widely used
Complicated model, needs competent
professional management. High administrative
overhead.
When to use Spiral model
Requirements Capture
Iterate
Quick Design
Build Prototype
Customer Evaluation of
Prototype
Engineer Final
Product
Rapid Prototype Advantages
Unlike the waterfall model in agile model very limited planning is required to
get started with the project. Agile assumes that the end users’ needs are ever
changing in a dynamic business and IT world.
Changes can be discussed and features can be updated or removed based on
feedback. This effectively gives the customer the finished system they need.
Both system developers and stakeholders have more freedom of time and
options than if the software was developed in a more rigid sequential way.
Having options gives them the ability to leave important decisions until more
or better data or even entire hosting programs are available.
V-Model
The V-model is useful in every phase of the software development life
cycle.
This model determines the complex relationship between each phase
of the software development and ensures that each phase of software
development is associated with testing.
It emphasizes that testing occurs in every phase of software
development and does not occur only after the coding is completed.
It determines the software development process within the
organization.
It determines the activities and the results to be produced in the
software development.
It describes the products to be created during the software project.
V-Model
V-Model
V-Model advantages:
It is also called as verification and validation Model. This
means the verification and validation will be done side by
side.
It emphasises the strict process flow to develop a quality
product. Errors that occur in any phase will be corrected
in that phase itself.
V-Model disadvantages:
It needs lot of resources and money
It needs an established process to implement
It can be implemented by only some big companies
COTS
COTS =
Commercial Off-The-Shelf software
Engineer together a solution from existing
commercial software packages using minimal
software ”glue”.
E.g. using databases, spread sheets, word
proccessors, graphics software, web browsers, etc.
COTS
COTS Advantages
Fast, cheap solution
May give all the basic functionality
Well defined project, easy to run
COTS Disadvantages
Limited functionality
Licensing problems, freeware, shareware, etc.
License fees, maintainance fees, upgrade
compatibility problems
97
Software
Engineering 1
Lesson 4
Project Planning
SE Project Planning
Project planning is the art of scheduling the
necessary activities, in time, space and across
staff in order to optimise:
money staff
Project constraints
Computing
resources time
Cognitive Contents of SE Project Plan
A project plan contains much information,
but must at least describe:
resources needed
Management,
Customers
Subcontractors
Suppliers
Investors
Banks
Visible Artefacts of SE Project
Unlike other engineers (e.g. civil, electronic, chemical … etc.)
software engineers do not produce anything physical.
C-requirements
D-requirements
Architecture
Detailed design
Implementation
Test
C-requirements
D-requirements
Architecture
Detailed design
Implementation
Unit test
Integration
System test
104
Software
Engineering 1
Lesson 5
REQUIREMENT ANALYSIS
CONCEPTS AND PRINCIPLES
Requirements Process
Aspect-Oriented
Requirements
Object-Oriented
Analysis & Design
Structured
Analysis & Design
Agile
Development User
Stories
105
Requirements Engineering
Components
Requirements gathering
(a.k.a. “requirements elicitation”) helps the customer to
define what is required: what is to be accomplished,
how the system will fit into the needs of the business,
and how the system will be used on a day-to-day basis
Requirements analysis
refining and modifying the gathered requirements
Requirements specification
documenting the system requirements in a semiformal
or formal manner to ensure clarity, consistency, and
completeness
106
Requirements Collection
usage scenarios
1.107
Requirements Analysis and Specification
1.108
Specifying Customer Requirements
3. Write C-requirements
in standard document form
1.113
Requirements Analysis Concepts and
Principles
- Requirements Analysis
- Communication Techniques
- Initiating the Process
- Facilitated Application Specification
Techniques
- Analysis Principles
- Information Domain
- Modeling
- Partitioning
- Software Prototyping
- Selecting the Prototyping Approach
- Prototyping Methods and Tools
- The Software Requirements Specification
- Specification Principles
- Representation
Requirements Analysis
- Requirements analysis:
- The process of deriving the system requirements
through observation of existing systems, discussion
with users and customers, task analysis, and so on.
Requirements definition:
- Translating the information into a REQ. document.
Requirements specification:
- Define system requirements using a consistent
precise, and complete way.
- Using some requirements specification method
Requirements Engineering Process
Feasibility
Study
Requirements
analysis
Requirements
definition
Feasibility
report System Requirements
models specification
Definition of
requirements
Requirements Specification
documents of requirements
Requirements Analysis Process
- Domain understanding:
- Understanding of application domain.
- Requirements collections:
- The process of interacting with customers, users to discover
the requirements for the system.
- Requirements classification:
- Group and classify the gathered requirements.
- Conflict resolution:
- Resolve the conflict requirements.
- Prioritization:
- Identify and list requirements according to their importance
- Requirements validation:
- Check and validate the gathered requirements to see
if they are complete, correct, and sound.
Requirements Analysis Process
Requirements
definition and
Requirements
specification
validation
Domain
understanding Prioritization
Requirements Conflict
collection resolution
Classification
Communication Techniques
Initiating the Process:
Are you the right person to answer these questions? Are your answers
“official”?
Facilitated Application Specification Techniques
(FAST)
Customers and software engineers often have an unconscious “us and
them” mind set.
This may cause: misunderstandings, miss important information,….
To solve the problem, FAST approach is proposed.
- Normal requirements:
- Expected requirements:
implicit requirements:
- Exciting requirements:
The first operational analysis principle requires to exam the information domain.
Information domain contains three different views of the data and control:
- information flow:
represents the manner in which data and control change as each moves
through
a system. Data and control moves between two transformations (functions)
- information structure:
represent the internal organization of various data and control items
- data tree structure
- data table (n-dimension)
Modeling
During software requirements analysis, we create models of the system to be built.
The models focus on:
- what the system must do, not how it does it.
- Functional models
Software transforms information. Three generic functions:
- input, processing, output
- Behavior models
Most software responds to events from the outside world
A behavior model creates a representation of the states of the software
and events that cause software to change state
Horizontal partition
SafeHome Software
The system shall keep the door locked at all times, unless commanded otherwise by authorized
REQ1 5 user. When the lock is disarmed, a countdown shall be initiated at the end of which the lock shall
be automatically armed (if still disarmed).
REQ2 2 The system shall lock the door when commanded by pressing a dedicated button.
REQ3 5 The system shall, given a valid key code, unlock the door and activate other devices.
The system should allow mistakes while entering the key code. However, to resist “dictionary
REQ4 4 attacks,” the number of allowed failed attempts shall be small, say three, after which the system
will block and the alarm bell shall be sounded.
REQ5 2 The system shall maintain a history log of all attempted accesses for later review.
REQ6 2 The system should allow adding new authorized persons at runtime or removing existing ones.
The system shall allow configuring the preferences for device activation when the user provides a
REQ7 2
valid key code, as well as when a burglary attempt is detected.
The system should allow searching the history log by specifying one or more of these parameters:
REQ8 1 the time frame, the actor role, the door location, or the event type (unlock, lock, power failure,
etc.). This function shall be available over the Web by pointing a browser to a specified URL.
The system should allow filing inquiries about “suspicious” accesses. This function shall be
REQ9 1
available over the Web. 130
131
Software
Engineering 1
Lesson 6
REQUIREMENT ENGINEERING
Requirements Engineering
Requirements Engineering
Requirements Management
Requirements Engineering
Stakeholder identification
Stakeholder interviews
Contract-style requirement lists
Measurable goals
Prototypes
Use cases
Requirements Engineering
object-oriented view
class structure class diagram
Requirements Analysis
algorithmic view
control structures
pseudo code, structogram, flow diagram
conditions rules, decision table
state-oriented view
state machines
Petri nets
sequence charts
IEEE Std 830-1998 IEEE Recommended Practice for
Software Requirements Specifications -Description
Abstract:
The content and qualities of a good software requirements
specification (SRS) are described and several sample SRS
outlines are presented. This recommended practice is aimed
at specifying requirements of software to be developed but
also can be applied to assist in the selection of in-house
and commercial software products. Guidelines for
compliance with 12207.1-1997 are also provided.
Keywords:
contract, customer, prototyping, software requirements
specification, supplier, system requirements specifications
Software Requirement Specification
A software requirements specification (SRS) is a complete
description of the behavior of the system to be developed
Lesson 7
REQUIREMENT MANAGEMENT
Introduction to Requirements Management
Requirements
Management
Change Management
Traceability
Baselines
Requirements Management Tools
A factor present in every successful project and absent in every
unsuccessful project is sufficient attention to requirements.
156
Why Do Requirements Change?
Change in software development: as inevitable as difficult to
control!
Better understanding: new requirements become apparent
Business
Context
Technologies
Markets
…
Possible responses to change
Add, modify, or remove requirements
157
Changing requirements
Requirements will change!
inadequately captured or expressed in the first place
user and business needs may change during the
project
document is complete
Assigning chapter/section numbers is an implicit
Dynamic renumbering
Some word processing systems allow for automatic renumbering of
database record identifier is assigned which is then used for all subsequent
references to the requirement
Symbolic identification
Requirements can be identified by giving them a symbolic name which is
associated with the requirement itself (e.g., SEC1, SEC2, SEC3… may be used
for requirements which relate to system security)
164
Attributes of Requirements
Apart from an identifier, requirements should have attributes that
establish context and background, and go beyond the requirement
description
For filtering, analysis, metrics…
Creation date, Last update, Author, Stakeholders (Owners / Source)
Version number
Rationale, Comments
Acceptance criteria
Lesson 8
TRACEABILITY
Introduction
Traceability in a nutshell
Shows forward and backward relationships linking
Development
Risk
Importance of Traceability (2)
Benefits of traceability
Prevents losing knowledge
Supports the verification process (certification, localization of defects)
Impact analysis
Change control
Process monitoring (e.g., missing links indicate completion level)
Improved software quality (make changes correctly and completely)
Reengineering (define traceability links is a way to record reverse engineering
knowledge)
Reuse (by identifying what goes with a requirement: design, code…)
Risk reduction (e.g., if a team member with key knowledge leaves)
Some Traceability Difficulties
Manual process
Viewed by developers as a low priority
Misunderstood
No single modeling method
Poor documentation
How is Tracing Performed?
System Requirements
Document
System Specification
Interface Control
Document
Backward traceability
To previous stages of development
Depends upon each element explicitly referencing its source in earlier
documents
Forward traceability
To all documents spawned by a document
Depends upon each element in the document having a unique name or
reference number
users’ needs
Forward-from traceability
Links requirements to the design and implementation components
requirements
Help determine why each item is designed/implemented
Backward-from traceability
Links requirements to their sources in other documents or people
Help validation
needs
Types of Traceability (1)
dependent on them
Requirements – architecture traceability
Links requirements with the subsystems where these requirements are
case…
Can be used to defined relationships between pairs
E.g., specifies/is specified by, depends on, is parent of, constrains…
Depends-on
R1 R2 R3 R4 R5 R6
R1 * *
R2 * *
R3 * *
R4 *
R5 *
R6
Representation – Traceability List
Number of requirements
The greater the number of requirements, the more the need for formal
traceability policies
Expected system lifetime
More comprehensive traceability policies should be defined for systems which
policies
Factors to Consider during Planning (2)
Type of system
Critical systems such as hard real-time control systems or safety-critical
The types of links to use (and their attributes) must be defined for different types
of requirements
It is a design problem!
Business
requirement
modifies
Drives specification of
Is origin of Is origin of
modifies modifies
Software functional
Depends on another
requirement
Is satisfied by
Is verified by Lead to creation of
Architectrue, Project plan
user interface, or System test
task
functional design
Is verified by Is implemented in
Is verified by
Unit test
Cardinality of Traceability Links
What is traceability?
Why is traceability important?
How is traceability performed?
What tools perform traceability?
What is the future of traceability?
194
Software
Engineering 1
Lesson 9a
Unified Modeling Language
(UML)
1. INTRODUCTION
Overview
What is UML?
Understanding the basics of UML.
UML diagrams
UML Modeling tools
Unified Modeling Language
197
Origins of UML (continued)
Consists of a family of graphical notations that help in
describing and designing software systems
The UML uses mostly graphical notations to express the OO analysis and
design of the software development process.
Used for both forward engineering (i.e., build diagrams before coding)
and reverse engineering (i.e., build diagrams from existing code)
Goal is completeness
Is more definitive, while the sketch approach is more explorative
Used to describe a detailed design for a programmer to follow in
writing source code
Notation should be sufficiently complete so that a programmer can
follow it in a straightforward manner
Can be used by a designer to develop blueprint-level models that
show interfaces of subsystems or classes
Developers then work out the implementation details
As a reversed engineered product, diagrams convey detailed
information about the source code that is easier for developers to
understand
202
Ways of using UML - As a Programming
Language
203
Understanding the Problem Domain
System to be developed
Actors
Agents external to the system
Concepts/ Objects
Agents working inside the system
Use Cases
Scenarios for using the system
204
Types of UML Diagrams
205
State Machine Models how events change an object over its life
Sequence Diagram:
Displays the time sequence of the objects participating in the
interaction.
Types of UML Diagrams (Cont.)
Collaboration Diagram
Displays an interaction organized around the objects and
their links to one another.
State Diagram
Displays the sequences of states that an object of an
interaction goes through during its life in response to
received stimuli, together with its responses and actions.
Component Diagram
Illustrate the organizations and dependencies of the
physical components in a system. A higher level than class
diagrams.
Types of UML Diagrams (Cont.)
Composite structure diagram:
Describes the internal structure of a class and the collaborations
that this structure makes possible.
Deployment diagram:
Describes the hardware used in system implementations and the
execution environments and artifacts deployed on the hardware.
Object diagram:
Shows a complete or partial view of the structure of a modeled
system at a specific time.
Package diagram:
Describes how a system is split up into logical groupings by
showing the dependencies among these groupings.
Classification of Diagram Types
Class
Diagram
Component
Diagram
Structure Composite
Diagram Structure Diagram
Deployment
Diagram
Object
Diagram
Package
Diagram Diagram
Sequence
Use Case Diagram
Diagram
Behavior Communication
Activity Diagram
Diagram Diagram
Interaction
Interaction Overview
Diagram Diagram
State Machine Timing
Diagram Diagram 210
Structure Diagrams
UML state machine diagram: describes the states and state transitions of the
system.
Interaction Diagrams
Interaction diagrams emphasize the flow of control and data
among the things in the system being modeled:
Interaction Diagrams
Sequence diagram: shows how objects communicate with
each other in terms of a sequence of messages. Also
indicates the life spans of objects relative to those
messages.
An activity diagram shows the context for use cases and also the details
of how a complicated use case works
It also shows the attributes and operations of interest in domain classes and the
relationships among the classes
A state diagram shows the various states of a domain class and events
that change that state
215
Fitting UML into
Software Design
A class diagram drawn from the software perspective can show
design classes, their attributes and operations, and their relationships
with the domain classes
A state diagram shows the various states of a design object and events
that change that state
doSomething()
doSomethingElse()
Interaction Diagram
doSomethingYetElse()
Online information:
http://www.uml.org
218
219
Software
Engineering 1
Lesson 9b
Unified Modeling Language
(UML)
2. ELEMENTS ,
RELATIONSHIPS &
Structural Modeling: Core Elements
element.
component a modular, replaceable and
significant part of a system that
packages implementation and
exposes a set of interfaces.
node a run-time physical object that
represents a computational
resource.
Introduction to UML 224
Structural Modeling: Core Elements (cont’d)
Example
+ criticalMsg: String [1] = "Error message" {readonly}
Syntax
Visibility marker: public (+) or private (-)
Name: name of the attribute in the programming language
Type: Type of the attribute in the programming language
Multiplicity: how many objects fill the property
Default: Default value of the attribute at instantiation
{property-string}: additional properties of the attribute
Describes a property as a line of text within the class box
Used for representing value types
228
Operation
visibility name (parameter-list) : return-type {property-string}
Example: + computeTotal (account: Account) : float
Syntax
Visibility marker: public (+) or private (-)
Name: name of the operation in the programming language
Parameter-list: list of parameters passed to the operation
Syntax: direction name : type = default-value
Return-type: Type of the return value if there is one
{property-string}: additional properties of the operation
Portrays actions that a class knows to carry out
Corresponds to the methods of a class
Operations may be queries or modifiers; modifiers change the state of
any object
Set and get operations are implied and therefore not shown
229
Associations
Name
231
Associations
Job
Company
employer employee Person
Job boss
salary
0..1
worker
Manages
Person
{X or}
Account
Corporation
232
Aggregation
Has a strong life cycle dependency between instances of the container class
and instances of the contained class(es)
Window
Window
1
1 1
+vertex
1 3..
Contains
Polygon Point
{ordered}
1
GraphicsBundle
1
-bundle color
texture
density
237
Aggregation vs. Composition
Composition Aggregations
Is a strong form of aggregation Less rigorous than a composition.
Must be an essential part to the May form "part of" the aggregate, but
Composition may not be essential to it.
Components cannot exist independent of They may also exist independent of the
their owner; both have coincident aggregate.
lifetimes
Components have only one owner Components may have many owners
e.g. (1)Each car has an engine that can e.g. (1)Apples may exist independent of
not be shared with other cars. the bag.
(2) If the polygon is destroyed, so are (2)An order is made up of several
the points. products, but the products are still
there even if an order is cancelled.
Generalization (Kind-of)
Indicates that one of the two related classes (the subtype) is
considered to be a specialized form of the other (the super
type)
A supertype is considered a 'Generalization' of subtype
Generalization-Specialization relationship
A is a type of B
E. g. "an oak is a type of tree", "an automobile is a type
of vehicle"
Super class
Subclass Subclass
242
Generalization (Kind
of)
Shape
Shape
Shared Target Style
...
Polygon Ellipse Spline
243
Generalization
Vehicle
power venue
power venue
{overlapping} {overlapping}
Truck Sailboat
Examples
One class sends a message to another class
One class mentions another as a parameter to an operation
245
Dependencies
ClassA ClassB ClassD
«friend»
«friend»
operationZ()
«instantiate»
«call» ClassC
«refine»
ClassC combines
two logical classes
ClassD ClassE
«call» ClassC
«refine»
ClassC combines
two logical classes
ClassD ClassE
Controller
«access»
«access»
«access» Diagram
Elements
«access»
«access»
Domain Graphics
Elements Core
employee employer
0..1
Person Company
0..1
boss
{Person.employer =
Person.boss.employer}
252
Use Case Diagram
A use case diagram
Is a type of behavioral diagram defined by and created from
a Use-case analysis.
Actors: A role that a user plays with respect to the system,. e.g.,
humans, an external system that needs information from current system.
A use case diagram is a graphical table of contents of the use cases for a
system . It shows the use cases, the actors, and their relationships
Use cases have no correlation to the classes in the system and can serve as
a starting point for writing software validation test cases
Use Case Diagram(core relationship)
employee
waitress
Use cases diagram
Use Case Diagram
Telephone Catalog
Check
status
Place Salesperson
order
F ill orders
Establish
credit
Supervisor
or in MS Visio <<uses>>
Supply Order
Customer Data Product Arrange
Payment
Place Order
Request
Catalog
Extend: a dotted line labeled <<extend>> with an arrow toward the base
case.
The extending use case may add behavior to the base use case. The base class
declares “extension points”.
<<extend>>
Used when exceptional circumstances are encountered. For example, the <get
approval> Use Case may optionally extend the regular <modify order> Use
Case.
Note: other expressions. For example, in MS Visio
<<uses>> <<extends>>
Use Case Diagrams(cont.)
Use Case Diagrams
Borrow
Employee
Client
Order Title
Fine Remittance
Supervisor
Cook
Notify customer that
food and drink are ready
Customer
1 * Place
Order
Salesperson
Establish
1 *
Credit
Supervisor
Introduction to UML 270
Example: Use Case Description: Change
Flight
Preconditions:
· Traveler has logged on to the system and selected ‘change
flight itinerary’ option
Basic course
· System retrieves traveler’s account and flight itinerary from
client account database
· System asks traveler to select itinerary segment she wants to
change; traveler selects itinerary segment.
· System asks traveler for new departure and destination
information; traveler provides information.
· If flights are available then
· System displays transaction summary.
Alternative courses
· If no flights are available then
271
Example: Online HR System: Update Benefits Use
Case
Preconditions:
· Employee has logged on to the system and selected ‘update
benefits’ option
Basic course
· System retrieves employee account from employee account db
· System asks employee to select medical plan type; include
Update Medical Plan.
· System asks employee to select dental plan type; include Update
Dental Plan.
Alternative courses
· If health plan is not available in the employee’s area the employee
is informed and asked to select another plan...
272
Online HR System: Use Case Relationships
Update Benefits
______________
E xtension points extension point
benefit o ptions: nam e and
after required enrollm ents location
E m ployee
<<extend>> <<extend>>
em ployee requests em ployee requests
reim bursem ent option stock purchase option
E lect
E lect S tock
R eim bursem ent extension
P urchase
for H ealthcare condition
O n lin e H R S ys te m
L o c a te
E m p lo ye e s
U p d a te
E m p lo ye e M anager
P ro file
E m p lo ye e H e a lth c a re P la n S ys te m
Ac c e s s T ra v e l
{re a d O n ly}
S ys te m
Ac c e s s P a y In s u ra n c e P la n S ys te m
R e c o rd s
When defining use cases in text, use nouns and verbs accurately and
consistently to help derive objects and messages for interaction diagrams
Factor out common usages that are required by multiple use cases
If the usage is required use <<include>>
If the base use case is complete and usage is optional, consider use <<extend>>
4. ACTIVITY DIAGRAM
Activity Diagram
Serves as a technique to describe procedural logic, business
process logic, and work flow
F
n>1
T
Set accumulator = accumulator * n
Set n = n - 1
F (n mod 5) == 0
T
Display accumulator value
Branch
Joint
283
Merge
End
Activity Diagram [Modeling System Workflows]
Initial
node
Select
“Unlock”
Enter Key
Action
Decision
Verify Key
Signal
Success
Notify
Intrusion
Open Lock &
Lit Light
Sound Alarm
Start Autolock
Timer
Activity
Merge
final node
285
Software
Engineering 1
Lesson 9e
Unified Modeling Language
(UML)
5. CLASS DIAGRAM
Class diagram
UML class diagrams
Show the classes of the system, their inter-
relationships, and the operations and attributes of the
classes
Explore domain concepts in the form of a domain model
Defines
Persistent system state
System behavior
The class icon has
Name
Attributes
Operations
It’s a rectangle divided into Draw class symbol in the editor and name
it
three compartments.
List the class attributes
List the class operations/methods
Make the links and associations
Give notations
Class Diagram
Describes the types of objects in the system and the various kinds of
static relationships that exist among them
Also shows the properties and operations of a class and the constraints
that apply to the way objects are connected
291
Classes: Compartments with names
Reservation
operations
guarantee()
cancel ()
change (newDate: Date)
responsibilities
bill no-shows
match to available rooms
exceptions
invalid credit card
292
Classes: method body
PoliceStation
alert (Alarm)
1 station
BurglarAlarm
report () { if isTripped
then station.alert(self)}
293
Types and Implementation Classes
«type» «implementationClass»
Object HashTable
* elements 1 body
«type» «implementationClass»
Set HashTableSet
addElement(Object)
removeElement(Object) addElement(Object)
testElement(Object):Boolean removeElement(Object)
testElement(Object):Boolean
setTableSize(Integer)
294
Notation of Class Diagram: association
Bi-directional association
Associations are assumed to be bi-directional
e.g. Flight and plane
notation:
Uni-directional association
e.g. Order and item
notation:
Association: Multiplicity and Roles
student
1 *
University Person
0..1 *
employer teacher
Multiplicity Role
Symbol Meaning “A given university groups many people;
1 One and only one some act as students, others as teachers.
0..1 Zero or one A given student belongs to a single
M..N From M to N (natural university; a given teacher may or may
language) not be working for the university at a
* From zero to any positive
particular time.”
integer
0..* From zero to any positive
integer
1..* From one to any positive
integer
Notation of Class Diagram: Generalization
Example: Customer
Supertype
Regular Loyalty
Customer Customer
COMPOSITION
Whole Class Composition:
Class W
It expresses a relationship where an instance of the
Whole-class has the responsibility to create and
initialize instances of each Part-class.
Class P1 Class P2
Instances of the Whole-class has exclusive access to
Part Classes
control of instances of the Part-classes.
Example
Used to express a relationship where the behavior of
Part instances is undefined without being related to
Automobile an instance of the Whole.
1
{if Order.customer.creditRating is Generalization
"poor", then Order.isPrepaid must
be true }
O rd e rB e a n
< < in te rfa c e > > {a b s tra c t}
E n tityB e a n
+ g e tO rd e rS ta tu s
+ s e tO rd e rS ta tu s
P M O rd e r
+ g e tL in e Ite m s
+ s e tL in e Ite m s
o rd e r + g e tC re d itA p p ro ve d
+ s e tC re d itA p p ro ve d
* ...
1 o rd e r
b u ye r 1 * ite m
C u s to m e r L in e Ite m
P M L in e Ite m
{a b s tra c t}
*
* ite m
1 c o m m o d ity
P ro d u c t
309
Class Diagram Example 9
Report
Error Log Input Handler Generator Account Account List
1..n
310
When to Use Class Diagrams
Class diagrams are the backbone of UML and are the most
used diagrams
311
312
Software
Engineering 1
Lesson 9f
Unified Modeling Language
(UML)
6. SEQUENCE DIAGRAM
Sequence Diagram: Object interaction
A B
2: title data ()
By describing the objects and the
messages they pass. 3: [not available] res erve title ()
4 : title returned ()
The horizontal dimension shows the
objects participating in the 5: hold title ()
interaction.
5 : title available ()
Shows a number of example objects and messages that are passed between
those objects within the use case
The columns of the diagram represent each object involved in the use case
The life time of an object progresses from the top of the diagram to the bottom
Clearly illustrates the calls between participants and the sequence of those calls
Gives a good picture about which participants are doing which processing
315
Sequence Diagram (continued)
316
Sequence Diagram
Object: Class
A sequence diagram is
An interaction diagram that
details how operations are
carried out.
What messages are sent and
when.
Sequence diagrams are
organized according to time
Message
Lifeline
Operations
317
Sequence diagram
UML 2 Sequence diagrams models the collaboration of objects based on
a time sequence. It shows how the objects interact with others in a
particular scenario of a use case.
319
Software
Engineering 1
Lesson 9h
Unified Modeling Language
(UML)
7. INTERACTION
DIAGRAM
Interaction overview diagram
UML 2 Interaction overview diagrams focuses
on the overview of the flow of control of the
interactions.
6: remove reservation
The objects are listed as rectangles and
arrows indicate the messages being User
3 : [not available] reserve title
Reservations
passed.
5: title available
6 : borrow title
The numbers next to the messages are 1: look up
2: title data
called sequence numbers. They show
the sequence of the messages as they
are passed between the objects.
4 : title returned
Catalog
Convey the same information as
sequence diagrams, but focus on object 5 : hold title
roles instead of the time sequence.
Interfaces: Shorthand Notation
S to re H o m e Store
P O S te rm in a lH o m e -sto re Id : In te g e r
-P O S list: L ist
POSterm inal <<use>> + cre a te ()
+ lo g in (U se rN a m e , P a s sw d )
P O S te rm in a l + fin d (S to re Id )
+ g e tP O S to ta ls (P O S id )
+ u p d a te S to re T o ta ls(Id ,S a le s)
S to re
+ g e t(Ite m )
322
Interfaces: Longhand Notation
S toreH om e S tore
323
Interaction overview diagram
Interaction Diagram [Door access]
326
Software
Engineering 1
Lesson 9i
Unified Modeling Language
(UML)
8. STATE DIAGRAM
State Diagrams
(Billing Example)
Start End
Unpaid Paid
Invoice created payin Invoice destroying
g
Basic rules for State Diagrams
From each state draw an arrow to another state if the object can
change from one to the other in one step.
Show the initial state by drawing an arrow from a black filled circle
to the initial state.
Yellow
Green
Event
State Diagrams
(Traffic light example)
Yellow
011
Event Expiry
Green
001
State Machine Diagram
Commonly called a state diagram
A state diagram describes the behavior of a system
In object-oriented technology, a state diagram shows the lifetime behavior
of a single object
A state diagram captures the behavior of a state across several use cases
A state diagram consists of states and transitions
Note that a state diagram is NOT a set of processes connected by lines
representing data input and output
A state is characterized by the current values of an object's attributes and
its name reflects some ongoing activity or state
A transition indicates a movement from one state to another because an
event has occurred; this transition changes one or more attribute values of
the class
331
State machine diagram
State machine diagram
Activity State
In some states, an object is inactive as it waits for the next
event before it does something
done
This is represented by "do/ activity" notation in the state
box
334
335
Software
Engineering 1
Lesson 9j
Unified Modeling Language
(UML)
9. COMPONENT DIAGRAM
Component diagram
Shows the dependencies among software components,
including the classifiers that specify them (for example
implementation classes) and the artifacts that implement
them;
Example
such as
source code files,
binary code files,
executable files,
scripts and tables.
Component Diagram
Components
a large rectangle with two smaller rectangles on the side.
Component Diagram (cont.)
Interface
An interface describes a group of operations used or
created by components. It represents a declaration of a set
of coherent public features and obligations, similar to a
contract.
Dependencies
dashed arrows.
Component Diagram (cont.)
order
customer
account
Components may be
specified by classifiers (e.g., implementation
classes)
implemented by artifacts (e.g., binary, executable,
or script files)
340
Components
S h o p p in g S e s s io n H o m e
<<E ntity>>
030303zak:O rder
O rd e rP K
<<au xiliary>>
O rd e rH o m e :O rderP K
O rd e rH o m e
<<fo cus>>
:O rder
O rd e rIn fo
O rd e r <<au xiliary>>
:O rderInfo
O rd e r
341
Component Diagram
S hoppingS essionH om e
<<E JB S ession>>
S hoppingS ession S hoppingS ession
<<E JB E ntity>>
C atalog
C atalogP K
<<auxiliary>>
C atalogP K
C atalogHom e C atalogHom e
<<focus>>
C atalog
C atalogInfo
C atalog <<auxiliary>>
C atalogInfo
C atalog
<<file>>
C atalogJAR
S hoppingC artHom e
S hoppingC art
<<E JB E ntity>>
S hoppingCart
342
Component diagram
Component Diagram with Relationships
< < re s id e > > < < re s id e > > < < re s id e > >
<<ejbEntity>>
C atalog
<<file>>
C atalogJAR
344
345
Software
Engineering 1
Lesson 9k
Unified Modeling Language
(UML)
:Client
<<brow ser>>
:O penS ourceBrow ser
videoStoreServer:AppServer
<<Container>>
V ideoS toreApplication
<<E ntity>>
S hoppingCart
<<Focus>>
S hoppingCart
:DBServer
<<database>>
:V ideoS toreDB
347
Deployment Diagram (2/2)
<<becom e>>
b acku p B ro ker
:B o n d B ro ker
348
Deployment diagram
Deployment diagram
Implementation Diagrams
Kinds
component diagram
deployment diagram
351
352
Software
Engineering 1
Lesson 9l
Unified Modeling Language
(UML)
Microsoft Visio
Dia: open source, much like visio. (
http://www.gnome.org/projects/dia/)
Others
(http://www.objectsbydesign.com/tools/umltools_byCompany.html )
Microsoft Visio
UML studio 7.1
Poor Design, need more heuristics!
A cleaner design
Reference
1. UML Distilled: A Brief Guide to the Standard Object Modeling
Language Martin Fowler, Kendall Scott
http://www.togethersoft.com/services/practical_guides/um
lonlinecourse/
359
360
Software
Engineering 1
Lesson 10
Database Fundamentals
Introduction to SQL
Systems Development Database
Life Cycle Development Process
Project Identification Enterprise modeling
and Selection
Project Initiation
and Planning Conceptual data modeling
Analysis
362
Overview
Define a database using SQL data definition
language
Work with Views
Write single table queries
Establish referential integrity
363
SQL Overview
Structured Query Language
The standard for relational database management
systems (RDBMS)
SQL-92 and SQL-99 Standards – Purpose:
Specify syntax/semantics for data definition and
manipulation
Define data structures
Enable portability
Specify minimal (level 1) and complete (level 2)
standards
Allow for later growth/enhancement to standard
364
365
SQL Environment
Catalog
A set of schemas that constitute the description of a database
Schema
The structure that contains descriptions of objects created by a
user (base tables, views, constraints)
Data Definition Language (DDL)
Commands that define a database, including creating, altering,
and dropping tables and establishing constraints
Data Manipulation Language (DML)
Commands that maintain and query a database
Data Control Language (DCL)
Commands that control a database, including administering
privileges and committing data
366
SQL Data types
(from Oracle 9i)
String types
CHAR(n) – fixed-length character data, n characters long
Maximum length = 2000 bytes
VARCHAR2(n) – variable length character data, maximum 4000
bytes
LONG – variable-length character data, up to 4GB. Maximum 1
per table
Numeric types
NUMBER(p,q) – general purpose numeric data type
INTEGER(p) – signed integer, p digits wide
FLOAT(p) – floating point in scientific notation with p binary digits
precision
Date/time type
DATE – fixed-length date/time in dd-mm-yy form
367
368
SQL Database Definition
Data Definition Language (DDL)
Major CREATE statements:
CREATE SCHEMA – defines a portion of the database
owned by a particular user
CREATE TABLE – defines a table and its columns
CREATE VIEW – defines a logical table from one or
more views
Other CREATE statements: CHARACTER SET,
COLLATION, TRANSLATION, ASSERTION,
DOMAIN
369
The following slides create tables for this
enterprise data model
370
Relational Data Model
371
Create PRODUCT table
Non-nullable specification
Primary keys
can never have
NULL values
372
Non-nullable specifications
Primary key
373
Controlling the values in attributes
Default value
Domain constraint
374
Identifying foreign keys and establishing relationships
Primary key of
parent table
Foreign key of
dependent table
375
Data Integrity Controls
Referential integrity – constraint that ensures
that foreign key values of a table must match
primary key values of a related table in 1:M
relationships
Restricting:
Deletes of primary records
Updates of primary records
Inserts of dependent records
376
377
Using and Defining Views
Views provide users controlled access to tables
Base Table – table containing the raw data
Dynamic View
A “virtual table” created dynamically upon request by a user
No data actually stored; instead data from base table made available
to user
Based on SQL SELECT statement on base tables or other views
Materialized View
Copy or replication of data
Data actually stored
Must be refreshed periodically to match the corresponding base
tables
378
Sample CREATE VIEW
CREATE VIEW EXPENSIVE_STUFF_V AS
SELECT PRODUCT_ID, PRODUCT_NAME, UNIT_PRICE
FROM PRODUCT_T
WHERE UNIT_PRICE >300
WITH CHECK_OPTION;
380
Disadvantages of Views
Use processing time each time view is referenced
May or may not be directly updateable
381
Create Four Views
CREATE VIEW CUSTOMER_V AS SELECT * FROM CUSTOMER_T;
382
Changing and Removing Tables
ALTER TABLE statement allows you to change
column specifications:
ALTER TABLE CUSTOMER_T ADD (TYPE
VARCHAR(2))
DROP TABLE statement allows you to remove
tables from your schema:
DROP TABLE CUSTOMER_T
383
Schema Definition
Control processing/storage efficiency:
Choice of indexes
File organizations for base tables
File organizations for indexes
Data clustering
Statistics maintenance
Creating indexes
Speed up random/sequential access to base table data
Example
CREATE INDEX NAME_IDX ON
CUSTOMER_T(CUSTOMER_NAME)
This makes an index for the CUSTOMER_NAME field of the
CUSTOMER_T table
384
Insert Statement
Adds data to a table
Inserting a record with all fields
INSERT INTO CUSTOMER_T VALUES (001, ‘Contemporary
Casuals’, 1355 S. Himes Blvd.’, ‘Gainesville’, ‘FL’, 32601);
Inserting a record with specified fields
INSERT INTO PRODUCT_T (PRODUCT_ID, PRODUCT_DESCRIPTION,
PRODUCT_FINISH, STANDARD_PRICE, PRODUCT_ON_HAND) VALUES
(1, ‘End Table’, ‘Cherry’, 175, 8);
Inserting records from another table
INSERT INTO CA_CUSTOMER_T SELECT * FROM CUSTOMER_T
WHERE STATE = ‘CA’;
385
386
387
388
389
Delete Statement
Removes rows from a table
Delete certain rows
DELETE FROM CUSTOMER_T WHERE STATE =
‘HI’;
Delete all rows
DELETE FROM CUSTOMER_T;
390
Update Statement
391
SELECT Statement
Used for queries on single or multiple tables
Clauses of the SELECT statement:
SELECT
List the columns (and expressions) that should be returned from the query
FROM
Indicate the table(s) or view(s) from which data will be obtained
WHERE
Indicate the conditions under which a row will be included in the result
GROUP BY
Indicate columns to group the results
HAVING
Indicate the conditions under which a group will be included
ORDER BY
Sorts the result according to specified columns
392
Figure 7-8: SQL statement
processing order
393
SELECT Example
Find products with standard price less than $275
Product table
394
395
SELECT Example using Alias
396
SELECT Example
Using a Function
Using the COUNT aggregate function to find totals
Aggregate functions: SUM(), MIN(), MAX(), AVG(),
COUNT()
Note: the IN operator in this example allows you to include rows whose
STATE value is either FL, TX, CA, or HI. It is more efficient than separate
OR conditions
399
SELECT Example –
Categorizing Results Using the GROUP BY Clause
Customer table
400
SELECT Example –
Qualifying Results by Categories
Using the HAVING Clause
For use with GROUP BY
401
Typical Software Eng. Problems
1. User works with computer system 1.a) System transforms input document to output document
(environment irrelevant/ignored)
Repository
User
System Environment
3. Computer system intermediates between 3.a) System observes the environment and displays information
the user and the environment
User System Environment 3.b) System controls the environment as commanded by the user
402
User System Environment
Problem Architecture
Feeding Transformation Receiving
1.a) Transformation: subsyste subsystem subsystem
m
Data
1.b) Simple workpieces: editor
User Data repository
Controlling Controlled
2. Required behavior: subsystem subsystem
Monitoring Monitored
3.a) Information display: subsystem subsystem
Display
Controlling Controlled
3.b) Commanded behavior: subsystem subsystem
Operator 403
Architectural Styles
World Wide Web architectural style:
REST (Representational State Transfer)
UNIX shell script architectural style:
Pipe-and-Filter
Client/Server
Central Repository (database)
Layered (or Multi-Tiered)
Peer-to-Peer
Model-View-Controller
404
Architectural Styles – Constituent Parts
1. Components
Processing elements that “do the work”
2. Connectors
Enable communication among components
Broadcast Bus, Middleware-enabled, implicit (events), explicit (procedure
calls, ORBs, explicit communications bus) …
3. Interfaces
Connection points on components and connectors
define where data may flow in and out of the components/connectors
4. Configurations
Arrangements of components and connectors that form an architecture
405
Architectural Style: Pipe-and-Filter
Components: Filters transform input into output
Connectors: Pipe data streams
Example: UNIX shell commands
406
Architectural Style: Layered
a.k.a. Tiered Software Architecture
407
Architectural Style:
Model-View-Controller
¨Model: holds all the data, state and application logic. Oblivious
to the View and Controller. Provides API to retrieve state and
send notifications of state changes to “observer”
¨View: gives you a presentation of the Model. Gets data directly
from the Model
¨Controller: Takes user input and figures out what it means to
the Model
display
5. I need your state (to display)
View
4. I have changed
Notification
Visual feedback
Model
Model about the
User of the altered
Visualizer
Visualizer effects of the
model
action
31
26 14
14 31
versus
Different Views for the same Model: 26
409
Real System is a Combination of
Styles
Subsystem Central
for device Repository
control
Subsystem
for remote
data access
- Valid keys
- Access history
Subsystem for - Tenant profiles
administration - …
Application Web
Web server
server browser
410
Fitting the Parts Together
Interface Specification Semantics
To serve as a contract between component providers and
clients, interfaces must be
fully documented
semantics, not just syntax
understandable, unambiguous, precise
Adding semantics
informal description
design models (e.g., UML interaction diagrams)
pre/post conditions
411
Documenting Software Architecture:
Architecture Views
Views are different kinds of “blueprints” created
for the system-to-be
E.g., blueprints for buildings: construction, plumbing,
electric wiring , heating, air conditioning, …
(Different stakeholders have different information
needs)
1. Module/Subsystem Views
2. Component and Connector Views
3. Allocation Views
412
Module/Subsystem Views
Decomposition View
Top-down refinement (e.g., simple “block diagram”)
Dependency View
How parts relate to one another
Layered View
Special case of dependency view
Class View
“domain model” in OOA and “class diagram” in OOD
413
Component and Connector Views
Process View
Defined sequence of activities?
System represented as a series of communicating processes
Concurrency View
Client/Server View
E.g., in Web browsing
414
Allocation Views
Deployment View
Software-to-hardware assignment
Implementation View
File/folder structure – “package diagram”
415
LECTURE 5: Use Cases
Actor Actor’s Goal (what the actor intends to accomplish) Use Case Name
Landlord To disarm the lock and enter, and get space lighted up. Unlock (UC-1)
Landlord To lock the door & shut the lights (sometimes?). Lock (UC-2)
Landlord To create a new user account and allow access to home. AddUser (UC-3)
Landlord To retire an existing user account and disable access. RemoveUser (UC-4)
To find out who accessed the home in a given interval of
Tenant InspectAccessHistory (UC-5)
time and potentially file complaints.
Tenant To disarm the lock and enter, and get space lighted up. Unlock (UC-1)
Tenant To lock the door & shut the lights (sometimes?). Lock (UC-2)
Tenant To configure the device activation preferences. SetDevicePrefs (UC-6)
LockDevice To control the physical lock mechanism. UC-1, UC-2
LightSwitch To control the lightbulb. UC-1, UC-2
[to be To auto-lock the door if it is left unlocked for a given
AutoLock (UC-2)
identified] interval of time.
( Actors already given if working from user stories instead of system requirements )
Types of Actors
Initiating actor (also called primary actor or
“user”): initiates the use case to realize a goal
Participating actor (also called secondary actor):
participates in the use case but does not initiate it:
Supporting actor: helps the system-to-be to complete
the use case
Offstage actor: passively participates in the use case,
i.e., neither initiates nor helps complete the use case,
but may be notified about some aspect of it (e.g., for
keeping records)
Use Case Diagram: Device Control
UC1: Unlock
UC2: Lock
UC3: AddUser
UC4: RemoveUser
UC5: InspectAccessHistory
UC6: SetDevicePrefs
UC7: AuthenticateUser
UC8: Login
system
boundary First tier use cases Second tier use cases
actor lude
» UC7: AuthenticateUser
«inc
«participate»
«initiate» »
UC1: Unlock t ic i pate
« par
«in
it «particip LockDevice
iat ate»
e»
Tenant
ate»
e» «particip
it iat
«i n
«pa LightSwitch
rtici
«initiate» UC2: Lock pate
»
«initiate + participate»
communication use case
Landlord Timer
Use Case Diagram: Account
Management UC1: Unlock
UC2: Lock
UC3: AddUser
UC4: RemoveUser
UC5: InspectAccessHistory
UC6: SetDevicePrefs
UC7: AuthenticateUser
UC8: Login
«initiate»
UC3: AddUser
« in
«ini clu
tiate de
» »
Landlord »
te «inclu
a UC4: RemoveUser de»
ti c ip
par
« » UC8: Login
c l ude
«in
t e»
«initia UC5: InspectAccessHistory
de»
lu
nc
«initi
ate» «i
Device Preferences
File Configure Help
Lights Air-
Air-conditioning Alarm bell Send SMS
Music Heating Police …
Apply Close
Resident
ManageUsers
[ Source: Robert Maksimchuk & Eric Naiburg: UML for Mere Mortals, Addison-Wesley, 2005. ]
Login Use Case?
BAD: GOOD:
Login
«inc
lude
AddUser »
AddUser
Login
Landlord
SetDevicePrefs Landlord SetDevicePrefs lu de»
«inc
Traceability Matrix (1)
UC1: Unlock
Mapping: System requirements to Use cases UC2: Lock
UC3: AddUser
REQ1: Keep door locked and auto-lock UC4: RemoveUser
REQ2: Lock when “LOCK” pressed UC5: InspectAccessHistory
REQ3: Unlock when valid key provided UC6: SetDevicePrefs
REQ4: Allow mistakes but prevent dictionary attacks UC7: AuthenticateUser
REQ5: Maintain a history log UC8: Login
REQ6: Adding/removing users at runtime
REQ7: Configuring the device activation preferences
REQ8: Inspecting the access history
REQ9: Filing inquiries
Req’t PW UC1 UC2 UC3 UC4 UC5 UC6 UC7 UC8
REQ1 5 X X
REQ2 2 X
REQ3 5 X X
REQ4 4 X X
REQ5 2 X X
REQ6 1 X X X
REQ7 2 X X
REQ8 1 X X
REQ9 1 X X
Max PW 5 2 2 2 1 5 2 1
Total PW 15 3 2 2 3 9 2 3
Related Requirements: List of the requirements that are addressed by this use case
Initiating Actor: Actor who initiates interaction with the system to accomplish a goal
Participating Actors: Actors that will help achieve the goal or need to know about the outcome
Preconditions: What is assumed about the state of the system before the interaction starts
What are the results after the goal is achieved or abandoned; i.e., what must be true
Postconditions:
about the system at the time the execution of this use case is completed
Flow of Events for Main Success Scenario:
The initiating actor delivers an action or stimulus to the system (the arrow indicates the
1.
direction of interaction, to- or from the system)
The system’s reaction or response to the stimulus; the system can also send a message to a
2.
participating actor, if any
3. …
Flow of Events for Extensions (Alternate Scenarios):
What could go wrong? List the exceptions to the routine and describe how they are handled
1a. For example, actor enters invalid data
2a. For example, power outage, network failure, or requested data unavailable
…
The arrows on the left indicate the direction of interaction: Actor’s action; System’s reaction
Use Case 1: Unlock
Use Case UC-1: Unlock
The test passes if the user enters a key that is contained in the
Pass/fail Criteria: database, with less than a maximum allowed number of
unsuccessful attempts
Step 2. Type in the correct System flashes a green light to indicate success;
records successful access in the database;
keycode and door identifier disarms the lock device
Use Case 2: Lock
Use Case UC-2: Lock
Related REQ1, REQ2, and REQ5 stated in Table 2-1
Requirements:
Initiating Actor: Any of: Tenant, Landlord, or Timer
Actor’s Goal: To lock the door & get the lights shut automatically (?)
Participating
Actors: LockDevice, LightSwitch, Timer
6. System (a) additionally filters the retrieved records to match the actor’s search criteria; (b) renders
the remaining records for display; and (c) shows the result for Tenant/Landlord’s consideration
Tenant/Landlord browses, selects “interesting” records (if any), and requests further investigation
7. (with an accompanying complaint description)
System (a) displays only the selected records and confirms the request; (b) archives the request in
8. the Database and assigns it a tracking number; (c) notifies Landlord about the request; and (d)
informs Tenant/Landlord about the tracking number
System Boundary & Subsystems
Use Case Variations Example:
Case (a):
Local face recognition
Local
computer
Face
image
Apartment building
Security
camera
Network
Network
Case (b):
Remote face recognition FaceReco, Ltd.
Modified Use Case Diagram
UC1: Unlock
UC2: Lock
UC3: AddUser
UC2: Lock
«p
art UC1: Unlock LockDevice
«inc
Tenant ic ipa lude
»
te»
UC7: AuthenticateUser
«pa
rtic
ipa
te»
UC3: AddUser «participate»
ate»
«initi
«in
clu
«initia ate»
te» de
» «particip
UC4: RemoveUser FaceReco, Ltd.
Landlord «inclu
de»
UC8: Login
Security and Risk Management
Identifying and preempting the serious risks to
system’s safe and successful functioning
Risk types:
Intolerable
As low as reasonably practical (ALARP)
Acceptable
Example abuse case input sequence:
invalid-key, invalid-key, … maxNumOfAttempts ;
wait maxAttemptPeriod ; invalid-key, invalid-key, …
System Sequence Diagram
[Modeling System Workflows]
enter key
verify key
start ("duration“)
: System
User AlarmBell Police
«initiating actor» «supporting actor» «offstage actor»
select function(“unlock")
enter key
verify key
notify intrusion
Dr Joe Essien
Topics
Identifying Concepts
Concept Attributes
Concept Associations
Contracts: Preconditions and Postconditions
Use Cases vs. Domain Model
In use case analysis, we consider In domain analysis, we consider
the system as a “black box” the system as a “transparent box”
(a) (b)
System Domain Model
Use Case 1
Use Case 2
Actor
Actor
Use Case N Actors
Actors
Example: ATM Machine
System
(b)
1
4 2
7 5 3
0
8
9
6
Domain Model
Actor
(Bank
Actor
(AT (Remote Concept 3
customer) Mm
ach datacenter) Concept 1
ine
)
(a) Concept n
Actor Concept 2
Actor
Building a Domain Model
Step 1: Identifying the boundary concepts
Internal
Concept 2 concepts
Concept 4
Actor B Actor D
Use Case 1: Unlock
Use Case UC-1: Unlock
Related Requirements: REQ1, REQ3, REQ4, and REQ5 stated in Table 2-1
Actor’s Goal: To disarm the lock and enter, and get space lighted up automatically.
1. Tenant/Landlord arrives at the door and selects the menu item “Unlock”
2. include::AuthenticateUser (UC-7)
System (a) signals to the Tenant/Landlord the lock status, e.g., “disarmed,” (b) signals to
3.
LockDevice to disarm the lock, and (c) signals to LightSwitch to turn the light on
4. System signals to the Timer to start the auto-lock timer countdown
5. Tenant/Landlord opens the door, enters the home [and shuts the door and locks]
Extracting the Responsibilities
Responsibility Description Type Concept Name
Coordinate actions of all concepts associated with a use case, a logical grouping of use cases,
D Controller
or the entire system and delegate the work to other concepts.
Container for user’s authentication data, such as pass-code, timestamp, door identification,
K Key
etc.
Verify whether or not the key-code entered by the user is valid. D KeyChecker
Container for the collection of valid keys associated with doors and users. K KeyStorage
Block the input to deny more attempts if too many unsuccessful attempts. D Controller
Symbolizes Symbolizes
“worker”-type “thing”-type
concept. concept.
«entity» «entity»
KeyChecker KeyStorage
«boundary» «entity»
KeycodeEntry Key
«boundary» «control»
StatusDisplay Controller LockDevice
«boundary»
HouseholdDeviceOperator
Resident LightSwitch
«boundary»
HouseholdDeviceOperator
verifies
conveys requests
«entity»
obtains Attributes
Key
«boundary»
KeycodeEntry userIdentityCode
timestamp
doorLocation
Association
«boundary» name
StatusDisplay
«control» LockDevice
Controller conveys requests «boundary»
HouseholdDeviceOperator
numOfAttempts
maxNumOfAttempts deviceStatuses
«boundary»
HouseholdDeviceOperator
deviceStatus
Preconditions: Tenant/Landlord is currently logged in the system and is shown a hyperlink “View Access History.”
Postconditions: None.
2. System prompts for the search criteria (e.g., time frame, door location, actor role, event type, etc.) or “Show all”
Rs2. Form specifying the search parameters for database log retrieval (from UC-5, Step 2). K Search Request
Rs3. Render the retrieved records into an HTML document for sending to actor’s Web
D Page Maker
browser for display.
Rs4. HTML document that shows the actor the current context, what actions can be done,
K Interface Page
and outcomes of the previous actions.
Rs5. Prepare a database query that best matches the actor’s search criteria and retrieve the
D Database Connection
records from the database (from UC-5, Step 4).
Rs6. Filter the retrieved records to match the actor’s search criteria (from UC-5, Step 6). D Postprocessor
Rs7. List of “interesting” records for further investigation, complaint description, and the
K Investigation Request
tracking number.
Rs8. Archive the request in the database and assign it a tracking number (from UC-5, Step 8). D Archiver
Rs9. Notify Landlord about the request (from UC-5, Step 8). D Notifier
Extracting the Associations
Concept pair Association description Association name
Page Maker Database Database Connection passes the retrieved data to Page Maker to
provides data
Connection render them for display
Page Maker Interface
Page Maker prepares the Interface Page prepares
Page
Controller Database
Controller passes search requests to Database Connection conveys requests
Connection
Archiver Investigation
Archiver generates Investigation Request generates
Request
Used to determine the actor’s credentials, which in turn specify what kind of
user’s identity
data this actor is authorized to view.
Search
Request
Time frame, actor role, door location, event type (unlock, lock, power failure,
search parameters
etc.).
Postprocesso Copied from search request; needed to Filter the retrieved records to match
search parameters
r the actor’s search criteria.
Archiver current tracking number Needed to assign a tracking number to complaints and requests.
Contact information of the Landlord who accepts complaints and requests for
Notifier contact information
further investigation.
Domain Model (4)
Domain model
for UC-5: Inspect Access History
posts «boundary»
Notifier
«boundary»
InterfacePage saves-data-to
contactInfo
Landlord
conveys-requests
prepares
«entity» «boundary»
PageMaker DatabaseConnection
provides-data
Resident Database
Domain Analysis:
Looking from Inside Out
Pr o f e s s i onal us e r
Spe a ks Es pe r a nt o
Co nf o r mi t y - dr i v e n Po t e nt i a l us e r
Ex pe c t e d c o mma nds : Spe a ks Kl i ng o n
Ekz e mpl e r o , Al g l ui , Cur i o s i t y - dr i v e n
Re da kt i , Vi ŝi Ex pe c t e d c o mma nds :
nI H, Suq, na w‘ , De g h
CURRENT USER
C Ac c i de nt al us e r
Do e s no t s pe a k
Cha nc e - dr i v e n
Ex pe c t e d c o mma nds :
<me a ni ng l e s s - i g no r e >
Traceability Matrix (1)
UC1: Unlock
Mapping: System requirements to Use cases UC2: Lock
UC3: AddUser
REQ1: Keep door locked and auto-lock UC4: RemoveUser
REQ2: Lock when “LOCK” pressed UC5: InspectAccessHistory
REQ3: Unlock when valid key provided UC6: SetDevicePrefs
REQ4: Allow mistakes but prevent dictionary attacks UC7: AuthenticateUser
REQ5: Maintain a history log UC8: Login
REQ6: Adding/removing users at runtime
REQ7: Configuring the device activation preferences
REQ8: Inspecting the access history
REQ9: Filing inquiries
Req’t PW UC1 UC2 UC3 UC4 UC5 UC6 UC7 UC8
REQ1 5 X X
REQ2 2 X
REQ3 5 X X
REQ4 4 X X
REQ5 2 X X
REQ6 1 X X X
REQ7 2 X X
REQ8 1 X X
REQ9 1 X X
Max PW 5 2 2 2 1 5 2 1
Total PW 15 3 2 2 3 9 2 3
Traceability Matrix (2)
UC1: Unlock
Mapping: Use cases to Domain model UC2: Lock
UC3: AddUser
UC4: RemoveUser
UC5: InspectAccessHistory
Domain Concepts UC6: SetDevicePrefs
UC7: AuthenticateUser
UC8: Login
HouseholdDeviceOperator
DatabaseConnection
InvestigationRequest
SearchRequest
Controller-SS2
Controller-SS1
InterfacePage
KeycodeEntry
StatusDisplay
KeyChecker
KeyStorage
PageMaker
Archiver
Notifier
Use
Key
PW
Case
UC1 15 X X X X X
UC2 3 X X X
UC3 2 X X X X
UC4 2 X X X X
UC5 3 X X X X X X X X
UC6 9 X X X X
UC7 2 X X X X X
UC8 3 X X X X
Contracts:
Preconditions and Postconditions
Operation Unlock
• set of valid keys known to the system is not empty
• numOfAttempts maxNumOfAttempts
Preconditions
• numOfAttempts = 0, for the first attempt of the current user
Operation Lock
Preconditions
None (that is, none worth mentioning)
Design
System Sequence Diagram Sequence Diagram
User
«initiating actor»
ystem
: System
Timer
«offstage actor»
checkKey()
sk := getNext()
select function(“unlock")
start ("duration“)
LECTURE 7: Object Oriented Design
Business Policies
Class Diagram
463
System Sequence Diagrams
We already worked with interaction diagrams: System Sequence Diagrams
: System
User Timer
«initiating actor» «offstage actor»
select function(“unlock")
enter key
verify key
start ("duration“)
User
«initiating actor»
ystem
: System
Timer
«offstage actor»
checkKey()
sk := getNext()
select function(“unlock")
start ("duration“)
checkKey()
accessList := retrieve(params : string)
R1.
interfacePage := activate( "lock" )
render(accessList : string) ?
R2.
(a) (b)
468
Characteristics of Good Designs
Short communication chains between the objects
method_1() method_1()
method_2()
…
Low degree of connectivity (associations) among
method_N()
the objects
469
Design Principles
Expert Doer Principle: that who knows should do
the task
High Cohesion Principle: do not take on too many
computation responsibilities
Low Coupling Principle: do not take on too many
communication responsibilities
checkKey() ok := checkKey()
setOpen(true) setOpen(true)
?
(a) (b)
• Although the Checker is the first to acquire the information about the key validity,
we decide to assign the responsibility to notify the LockCtrl to the Controller.
• This is because the Controller would need to know this information anyway—to
inform the user about the outcome of the key validity checking.
• In this way we maintain the Checker focused on its specialty and avoid assigning
too many responsibilities to it.
471
Cohesion
Low cohesion
High cohesion
472
Responsibility-Driven Design
1. Identify the responsibilities
domain modeling provides a starting point
some will be missed at first and identified in subsequent iterations
473
UC-4: View Access Log
«html»
interfacePage : : Controller : PageMaker : DatabaseConnection
Resident Database
result
[else] page :=
warning()
474
Example …
Communicating responsibilities identified for the system function “enter key”:
Responsibility Description
Send message to Key Checker to validate the key entered by the user.
475
Unlocking Sequence Diagram
checkKey()
sk := getNext()
logTransaction(val)
enterKey()
«create»
compare(k, sk)
logTransaction( k, val )
«destroy»
dl := isDaylight()
[else] numOfAttempts++
activate( "alarm" )
[else]
k := create()
checkKey(k) loop
sk := getNext()
setValid(ok)
controlLock(k)
ok := isValid()
opt ok == true
setOpen(true)
To avoid an impression that the above design is the only one possible!!
controlLight() checkIfDaylightAndIfNotThenSetLit()
dl := isDaylight() dl := isDaylight()
compare()
activate( "light" )
logTransaction(k, val) dl := isDaylight()
«destroy»
opt dl == false
dl := isDaylight()
loop
b
checkKey(k) : DeviceCtrl : PhotoSObs
sk := getNext()
setValid(ok)
checkIfDaylightAndIfNotThenSetLit()
controlLock(k) dl := isDaylight()
ok := isValid()
The caller opt dl == false
opt ok == true
could be
Controller or
setOpen(true) Checker setLit(true)
480
Business Policies
Controller
# numOfAttemps_ : long
# maxNumOfAttempts_ : long
+ enterKey(k : Key)
– denyMoreAttempts() KeyChecker
1
DeviceCtrl
1 logger
# devStatuses_ : Vector
Logger + activate(dev : string) : boolean
+ deactivate(dev :string) : boolean
+ logTransaction(k : Key) + getStatus(dev : string) : Object
482
Traceability Matrix (3)
Mapping: Domain model to Class diagram
Software Classes
«html» interfacePage
DatabaseConnection
SearchRequest
Controller-SS1
Controller-SS2
PhotoSObsrv
KeyChecker
KeyStorage
PageMaker
DeviceCtrl
Logger
Key
Domain Concepts
Controller-SS1 X
StatusDisplay
Key X
KeyStorage X
KeyChecker X
HouseholdDeviceOperator X
IlluminationDetector X
Controller-SS2 X
SearchRequest X
InterfacePage X
PageMaker X
Archiver
DatabaseConnection X
Notifier
InvestigationRequest 483
Types of Object Communication
SS1
1
AA BB
SS2
AA BB PP 2
SSN
N
484
485
Software
Engineering 1
Lesson 10
SOFTWARE TESTING
Topics
Overview of Software Testing
Test Coverage and Code Coverage
Practical Aspects of Unit Testing
Integration and System Testing
486
Overview of Software Testing
“Testing shows the presence, not the absence of bugs.” —
Edsger W. Dijkstra
A fault, also called “defect” or “bug,” is an erroneous hardware
or software element of a system that can cause the system to fail
Test-Driven Development (TDD)
Every step in the development process must start with a plan of how to verify
that the result meets a goal
The developer should not create a software artifact ( a system requirement, a UML
diagram, or source code) unless they know how it will be tested
488
Logical Organization of Testing
Component
( Not necessarily how it’s actually done! )
code Te
Unit st
e d
test co
m
po
Component ne
code nt
Unit
test Integrated
modules
Integration System
test test
System
in use
Ensures that all
Component components
code work together
Unit
test
490
Example: Test Case for Use Case
[ Recall Section 8: Detailed Use Case Specification ]
The test passes if the user enters a key that is contained in the database,
Pass/fail Criteria:
with less than a maximum allowed number of unsuccessful attempts
491
491
Test Coverage
Test coverage measures the degree to which the
specification or code of a software program has been
exercised by tests
Code coverage measures the degree to which the
source code of a program has been tested
Code coverage criteria include:
equivalence testing
boundary testing
control-flow testing
state-based testing
492
Code Coverage: Equivalence Testing
Equivalence testing is a black-box testing method that divides
the space of all possible inputs into equivalence groups such
that the program “behaves the same” on each group
Two steps:
1. partitioning the values of input parameters into equivalence groups
2. choosing the test input values
Equivalence classes:
valid equivalence class
0 100
493
Heuristics for Finding Equivalence Classes
494
Code Coverage: Boundary Testing
Boundary testing is a special case of equivalence
testing that focuses on the boundary values of input
parameters
Based on the assumption that developers often overlook
special cases at the boundary of equivalence classes
Selects elements from the “edges” of the equivalence
class, or “outliers” such as
zero, min/max values, empty set, empty string, and null
confusion between > and >=
etc.
495
Code Coverage: Control-flow Testing
Statement coverage
Each statement executed at least once by some test case
Edge coverage
Every edge (branch) of the control flow is traversed at least once by some test case
Condition coverage
Every condition takes TRUE and FALSE outcomes at least once in some test case
Path coverage
Finds the number of distinct paths through the program to be traversed at least once
Constructing the control graph of a program for Edge Coverage:
a; a; b; if a then b; if a then b else c; while a do b;
a a not a a
a a
b not a b c b
496
Code Coverage: State-based Testing
State-based testing defines a set of abstract states that a
software unit can take and tests the unit’s behavior by
comparing its actual states to the expected states
This approach has become popular with object-oriented
systems
497
State-based Testing Example
state valid-key /
signal-success
transition Blocked
valid-key /
signal-success
Unlocked
498
State-based Testing Example
invalid-key / invalid-key
signal-failure [numOfAttemps maxNumOfAttempts] /
Locked Accepting sound-alarm
valid-key /
signal-success
valid-key / Blocked
signal-success
Unlocked
499
Controller State Diagram Elements
Four states
{ Locked, Unlocked, Accepting, Blocked }
Two events
{ valid-key, invalid-key }
Five valid transitions
{ LockedUnlocked, LockedAccepting,
AcceptingAccepting, AcceptingUnlocked,
AcceptingBlocked }
500
Ensure State Coverage Conditions
501
Practical Aspects of Unit Testing
Mock objects:
A test driver simulates the part of the system that
invokes operations on the tested component
A test stub simulates the components that are called by
the tested component
The unit to be tested is also known as the fixture
Unit testing follows this cycle:
1. Create the thing to be tested (fixture), the driver, and
the stub(s)
2. Have the test driver invoke an operation on the fixture
3. Evaluate that the actual state equals expected state
502
Testing the KeyChecker (Unlock Use Case)
enterKey() start()
k := create() k := create()
display
result
(a) (b)
503
xUnit / JUnit
Verification is usually done using the
assert_*_() methods that define the expected
state and raise errors if the actual state differs
http://www.junit.org/
Examples:
assertTrue(4 == (2 * 2));
assertEquals(expected, actual);
assertNull(Object object);
etc.
504
Example Test Case
Listing 2-1: Example test case for the Key Checker class.
// 1. set up
Checker checker = new Checker( /* constructor params */ );
// 2. act
Key invalidTestKey = new Key( /* setup with invalid code */
);
boolean result = checker.checkKey(invalidTestKey);
// 3. verify
assertEqual(result, false);
}
}
505
Test Case Method Naming
1. Set up
methodName_startingState_expectedResult
2. Act
3. Verify
checkKey_anyState_invalidKeyRejected()
506
Another Test Case Example
Listing 2-2: Example test case for the Controller class.
// 2. act
cntrl.enterKey(invalidTestKey);
// 3. verify
assertEqual( // the resulting state must be "Blocked"
cntrl.getNumOfAttempts(), cntrl.getMaxNumOfAttempts()
);
assertEqual(cntrl.isBlocked(), true);
}
}
507
Integration Testing
Horizontal Integration Testing
“Big bang” integration
Bottom-up integration
Top-down integration
Sandwich integration
Vertical Integration Testing
508
Horizontal Integration Testing
Controller
Level-4
Level-3
System KeyChecker
Test
Logger Test Controller &
Bottom-up Test
KeyChecker & KeyStorage &
Key & Logger & PhotoSObsrv
testing: Test
DeviceCtrl Test KeyChecker
& KeyStorage &
Key
Test Key &
KeyStorage
Write a
Write a failing Make the
failing
acceptance test test pass
unit test
Refactor
outer feedback loop
510
Logical Organization of Testing
Component
( Not necessarily how it’s actually done! )
code Te
Unit st
e d
test co
m
po
Component ne
code nt
Unit
test Integrated
modules
Integration System
test test
System
in use
Ensures that all
Component components
code work together
Unit
test
51
2
Example of Test Case for Pen … Cont
513
Example of Test Case for Pen … Cont
21. Check if the pen’s ink is getting dry very quickly or very slowing. While writing on page, ink coming out of the
pen point should neither dry quickly nor dry too late.
22. Check if the pen is working properly on space environment if it mentioned in the requirement specifications.
[Capability testing]
23. Check how long you can write with a single refill of pen. [Capability testing]
24. Check if the pen is working properly on different type’s surfaces like smooth paper, rough paper, wooden
material, plastic, leather, steel, glass etc. [Compatibility Testing]
25. Check if he pen grips properly on the shirt pocket and user is able to carry on pocket with ease. [Robustness
Testing]
26. Check if the pen writing point is strong enough to bear a load of different users; like some user write with
some extra pressure on the pen tip. [Robustness Testing]
Negative Test Cases for Pen:
26. Check pen stress testing by dropping pen down from practical height and check if anything breaks, no
damage to pen and pen is working without any issues.
27. Hold the pen upwards direction for some time and try to write on paper.
28. Keep the pen in water and try to write on paper.
29. Check how pen is working at different climate environmental conditions like at room temperature, different
climate conditions.
514
SOFTWARE
DEVELOPMENT LIFE
CYCLE (SDLC)
Dr. Joe Essien
“You’ve got to be very careful if you don’t know where you’re going, because you might not get there.”
Yogi Berra
Capability Maturity Model (CMM)
A bench-mark for measuring the maturity of an
organization’s software process
CMM defines 5 levels of process maturity based on
certain Key Process Areas (KPA)
CMM Levels
Level 5 – Optimizing (< 1%)
-- process change management
-- technology change management
-- defect prevention
Level 4 – Managed (< 5%)
-- software quality management
-- quantitative process management
Level 3 – Defined (< 10%)
-- peer reviews
-- intergroup coordination
-- software product engineering
-- integrated software management
-- training program
-- organization process definition
-- organization process focus
Level 2 – Repeatable (~ 15%)
-- software configuration management
-- software quality assurance
-- software project tracking and oversight
-- software project planning
-- requirements management
Level 1 – Initial (~ 70%)
SDLC Model
A framework that describes the activities performed
at each stage of a software development project.
Waterfall Model
Requirements – defines needed
information, function, behavior,
performance and interfaces.
Design – data structures, software
architecture, interface
representations, algorithmic
details.
Implementation – source code,
database, user documentation,
testing.
Waterfall Strengths
Easy to understand, easy to use
Provides structure to inexperienced staff
Milestones are well understood
Sets requirements stability
Good for management control (plan, staff, track)
Works well when quality is more important than cost
or schedule
Waterfall Deficiencies
All requirements must be known upfront
Deliverables created for each phase are considered
frozen – inhibits flexibility
Can give a false impression of progress
Does not reflect problem-solving nature of software
development – iterations of phases
Integration is one big bang at the end
Little opportunity for customer to preview the system
(until it may be too late)
When to use the Waterfall Model
Requirements are very well known
Product definition is stable
Technology is understood
New version of an existing product
Porting an existing product to a new platform.
V-Shaped SDLC Model
A variant of the Waterfall
that emphasizes the
verification and validation
of the product.
Testing of the product is
planned in parallel with a
corresponding phase of
development
V-Shaped Steps
Project and Requirements Planning – Production, operation and
allocate resources maintenance – provide for
enhancement and corrections
Product Requirements and
System and acceptance testing –
Specification Analysis – complete check the entire software system in its
specification of the software system environment
Detailed Design – develop algorithms Unit testing – check that each module
for each architectural component acts as expected
Review design
Develop code
Inspect code
Test product
Spiral Quadrant
Plan next phase
Typical activities
Develop project plan
code
Life cycle and behavior of complex objects defined
If code reviews are good, review code all the time (pair programming)
If testing is good, everybody will test all the time
If simplicity is good, keep the system in the simplest design that supports
its current functionality. (simplest thing that works)
If design is good, everybody will design daily (refactoring)
If architecture is important, everybody will work at defining and refining
the architecture (metaphor)
If integration testing is important, build and integrate test several times a
day (continuous integration)
If short iterations are good, make iterations really, really short (hours rather
than weeks)
XP References
Online references to XP at
http://www.extremeprogramming.org/
http://c2.com/cgi/wiki?ExtremeProgrammingRoadmap
http://www.xprogramming.com/
Feature Driven Design (FDD)
Five FDD process activities
1. Develop an overall model – Produce class and sequence diagrams from chief
architect meeting with domain experts and developers.
2. Build a features list – Identify all the features that support requirements. The
features are functionally decomposed into Business Activities steps within
Subject Areas.
Features are functions that can be developed in two weeks and expressed in client terms with the
template: <action> <result> <object>
i.e. Calculate the total of a sale
3. Plan by feature -- the development staff plans the development sequence of
features
4. Design by feature -- the team produces sequence diagrams for the selected
features
5. Build by feature – the team writes and tests the code
http://www.nebulon.com/articles/index.html
Dynamic Systems Development Method
(DSDM)
Quality review
1.568
Roadmap
Course Overview
What is Software Engineering?
The Iterative Development Lifecycle
Software Development Activities
Methods and Methodologies
1.569
Principle Texts
Software Engineering. Ian Sommerville. Addison-
Wesley Pub Co; ISBN: 020139815X, 7th edition,
2004
Software Engineering: A Practioner's Approach.
Roger S. Pressman. McGraw Hill Text; ISBN:
0072496681; 5th edition, 2001
Using UML: Software Engineering with Objects
and Components. Perdita Stevens and Rob J.
Pooley. Addison-Wesley Pub Co; ISBN:
0201648601; 1st edition, 1999
Designing Object-Oriented Software. Rebecca 1.570
Recommended Literature
eXtreme Programming Explained: Embrace Change. Kent Beck. Addison-Wesley
Pub Co; ISBN: 0201616416; 1st edition (October 5, 1999)
The CRC Card Book. David Bellin and Susan Suchman Simone. Addison-Wesley
Pub Co; ISBN: 0201895358; 1st edition (June 4, 1997)
The Mythical Man-Month: Essays on Software Engineering. Frederick P. Brooks.
Addison-Wesley Pub Co; ISBN: 0201835959; 2nd edition (August 2, 1995)
Agile Software Development. Alistair Cockburn. Addison-Wesley Pub Co; ISBN:
0201699699; 1st edition (December 15, 2001)
Peopleware: Productive Projects and Teams. Tom Demarco and Timothy R. Lister.
Dorset House; ISBN: 0932633439; 2nd edition (February 1, 1999)
Succeeding with Objects: Decision Frameworks for Project Management. Adele
Goldberg and Kenneth S. Rubin. Addison-Wesley Pub Co; ISBN: 0201628783; 1st
edition (May 1995)
A Discipline for Software Engineering. Watts S. Humphrey. Addison-Wesley Pub
Co; ISBN: 0201546108; 1st edition (December 31, 1994)
1.571
Roadmap
Course Overview
What is Software Engineering?
The Iterative Development Lifecycle
Software Development Activities
Methods and Methodologies
1.572
Why Software Engineering?
A naive view: coding
Problem Specification Final
Program
But ...
Where did the specification come from?
How do you know the specification corresponds to the
user’s needs?
How did you decide how to structure your program?
How do you know the program actually meets the
specification?
How do you know your program will always work 1.573
What is Software Engineering? (I)
Some Definitions and Issues
1.575
What is Software Engineering?
(III)
“software engineering is different from other engineering
disciplines”
— Sommerville
1.576
Roadmap
Course Overview
What is Software Engineering?
The Iterative Development Lifecycle
Software Development Activities
Methods and Methodologies
1.577
Software Development Activities
1.578
Requirements
Establish customer’s needs
Collection
Model and specify the requirements
Analysis
(“what”)
Model and specify a solution
Design
(“how”)
1.579
Problems with the Waterfall
Lifecycle
1. “Real projects rarely follow the sequential flow that the model proposes.
Iteration always occurs and creates problems in the application of the
paradigm”
2. “It is often difficult for the customer to state all requirements explicitly.
The classic life cycle requires this and has difficulty accommodating the
natural uncertainty that exists at the beginning of many projects.”
1.580
Iterative Development
In practice, development is always iterative, and all activities
progress in parallel.
1.581
Iterative Development
Plan to iterate your analysis, design and
implementation.
1.583
The Unified Process
Inception Elaboration Construction Transition
Requirements
Analysis
Design
Implementation
Test
1.585
Roadmap
Course Overview
What is Software Engineering?
The Iterative Development Lifecycle
Software Development Activities
Methods and Methodologies
1.586
Requirements Collection
User requirements are often expressed informally:
features
usage scenarios
1.587
Changing requirements
Requirements will change!
inadequately captured or expressed in the first place
user and business needs may change during the
project
1.589
Object-Oriented Analysis
An object-oriented analysis results in models of the
system which describe:
classes of objects that exist in the system
responsibilities of those classes
relationships between those classes
use cases and scenarios describing
operations that can be performed on the system
allowable sequences of those operations
1.590
Prototyping (I)
A prototype is a software program developed to test,
explore or validate a hypothesis, i.e. to reduce
risks.
First do it,
then do it right,
then do it fast.
1.592
Design
Design is the process of specifying how the specified
system behaviour will be realized from software
components. The results are architecture and
detailed design documents.
Object-oriented design delivers models that describe:
how system operations are implemented by
interacting objects
how classes refer to one another and how they are
related by inheritance
Design is an iterative process,
attributes and operations
proceeding in parallelassociated
with to classes
implementation!
1.593
Conway’s Law
“Organizations that design systems are constrained to
produce designs that are copies of the communication
structures of th organizations”
1.594
Implementation and Testing
Implementation is the activity of constructing a
software solution to the customer’s requirements.
1.595
Design, Implementation and
Testing
Design, implementation and testing are iterative
activities
The implementation does not “implement the design”,
but rather the design document documents the
implementation!
1.596
Maintenance
Maintenance is the process of changing a system
after it has been deployed.
Corrective maintenance: identifying and repairing
defects
Adaptive maintenance: adapting the existing
requirements
In a spiral lifecycle, everything after
the delivery and deployment of the
first prototype can be considered
“maintenance”!
1.597
Maintenance activities
“Maintenance” entails:
configuration and version management
documentation
Repeatable, automated
tests enable evolution
and refactoring
1.598
Maintenance costs
“Maintenance” typically
accounts for 70% of software
costs! Changes in
Data Formats
17%
Changes in
User
Emergency Requirement
Fixes s
12%
Means: most Routine
project costs Debugging
9%
concern continued Hardware
Other
3%
development after Changes
6% Efficiency
deployment Improvements
Documentation 4%
6% – Lientz 1979
1.599
Roadmap
Course Overview
What is Software Engineering?
The Iterative Development Lifecycle
Software Development Activities
Methods and Methodologies
1.600
Methods and Methodologies
Tools
Methodologies
Principle
1.601
Object-Oriented Methods: a brief
history
First generation:
Adaptation of existing notations (ER diagrams, state
diagrams ...): Booch, OMT, Shlaer and Mellor, ...
Specialized design techniques:
CRC cards; responsibility-driven design; design by
contract
Second generation:
Fusion: Booch + OMT + CRC + formal methods
Third generation:
Unified Modeling Language:
uniform notation: Booch + OMT + Use Cases + ...
various UML-based methods (e.g. Catalysis)
1.602
What you should know!
How does Software Engineering differ from
programming?
Why is the “waterfall” model unrealistic?
What is the difference between analysis and
design?
Why plan to iterate? Why develop incrementally?
Why is programming only a small part of the cost
of a “real” software project?
What are the key advantages and disadvantages of
object-oriented methods?
1.603
Can you answer the questions?
What is the appeal of the “waterfall” model?
Why do requirements change?
How can you validate that an analysis model
captures users’ real needs?
When does analysis stop and design start?
When can implementation start?
What are good examples of Conway’s Law in
action?
1.604
JIRA Customization for EO
Projects
Advanced Computer Systems ACS SpA
June 2010
Scopes
Fix SW in Vx version
Bug -> maintenance team
Tracking
Develop-
Integraton ment
& Deliver SW in
Vx version
Testing Release
Validation &
Delivery of
SW in Vx
version
Typical Project Lifecycle
Project
End of
lifecycle
Warran Kick
ty Off
Changes Design
Phase
Bug
Tracking
Develop-
Integration ment
& Deliver SW in
Vx version
Testing Release
Issues can link each other
Issues can be moved
Issues in project reports
JIRA PLUGIN
AVAILABLE! MINUTES OF MEETING
USE STANDARD
JIRA PLUGIN JIRA EXPORT
AVAILABLE! (WORD,EXCEL)
FICHIE DE DIALOG
DELIVERY NOTE
PLUGINS : MOM
A JIRA plugin “Mom Parser” is available to extract and load
Action Items from a Minutes of Meeting.
The JIRA plugin , developed by ACS, permits to send an
email to a JIRA’s mail box with an xls file (Microsoft
Excel) as attachment, containing decisions and actions
decided in the meeting . It allows then the creation of new
Action Item issues extracted by the xls file;
The plug-in, after email processing, sends an email back,
with an updated xls file attached, providing to each issue
included in the original excel file the JIRA “unique” identifier
Other Roles are set for Quality and Managerial issue and are shown in
figure. They can be set also without creating a specific Group.
Dashboard is used to browse “issues” status and to have an high level view of them, such as :
how many,
which issue type,
to whom they are assigned to,
unassigned issues,
my unresolved issues,
issues assigned to me
Responsibilities
Watchers are :
- those users having seen an issue in which they are interested in and have
requested JIRA (in the left pane of the “issue detail” page) to add their
login to the watchers list.
- default watchers set in the Project Role while creating the Project
- users that while creating the issue have been set into the “Notify To” field
(field available only for specific issues like SPRs).
HOW ISSUE IS EVOLVING
(3)
How to monitor periodically issues evolution and….a
number of GOOD PRACTISES!!!!
Each User is suggested to log on JIRA daily and check the “issues” to
which he has been assigned for.
It is a good practise anyway to have a look to the recent issues opened
in each Project for which the User is granted to access in JIRA to
participate to the issue discussion.
Each user is requested to subscribe to a special “filter”, the “Overdue
in the next 5 days”. In this way he’ll be warned via email on the issues
having a “Due Date” (i.e. AIL) going to expire (see “important note” in
section 3.1.1.1).
Force all the Project Team to discuss the issues in the tool and not (at
least not only) via email. This shall allow a full log of all the
discussions held over an issue.
WORKFLOWS
:
SPRs
WORKFLOWS
:
HWI
WORKFLOWS
:
RID
HOW TO MANAGE
SW VERSIONS (1)
Create a new Version
• Email • CVS
RSS • Subversion
Excel • Perforce
• Visual SourceSafe
LDAP
• FishEye
Active Directory
WHY SOFTWARE
PROJECTS FAIL
Traditional
cost
Strong
degree of dependability
Why don’t companies adopt methods
that avoid these faults?
Traditional
cost
Strong
Current demand
degree of dependability
Why don’t companies adopt methods
that avoid these faults?
Traditional
cost
Future demand
Strong
Current demand
degree of dependability
Most spec changes arise from poor
requirements capture
Most software costs flow from error
detection and correction
The cost of correcting an error rises steeply with time
Up to 10 times with each lifecycle phase
The only way to reduce costs, duration and risks is to
greatly reduce errors and to find almost all the rest
almost immediately.
Strong Software Engineering
USE AN ARCHITECT!
Proof of
Proof of Security Functional
Properties Properties
INFORMED (SPARK Proof)
(SPARK Proof)
Design
System Test
Specification
SPARK
System Test Static Analysis
Implementation
Key
Assurance
Activity
OVERVIEW- Correct by Construction (C
by C) Process
A software engineering process employing good
practices and languages
SPARK (Ada 95 subset with annotations)
math based formalisms (Z) at early stages for verification
of partial correctness.
A supporting commercial toolset (Z/Eves, Examiner,
Simplifier, Proof Checker) for specifying, designing,
verifying/analyzing, developing safety or security
critical software.
procedure Inc;
--# global in out Trip, Total;
--# derives Trip from Trip & Total from Total;
Conclusions
The firm failed to ensure that adequate project management procedures were
in place
FSA January 2007
Fact finding
Part 1: Divide
those who do, and those who don’t
Part 2: 5 minutes only
attributes for success
attributes for failure
Part 3: Present failure – 1 minute
Discussion around failure
APM Group’s 10 reasons for
failure
Why, why, why, why, why?
Principle of 5 whys
Use an Ishikawa diagram (fishbone)
Start with a WBS, for example:
5 Optimising
5.1 5.3
5.2
Based on OGC Best Proactive
Problem
Management
Technology
Management
Continuous
Process
Improvement
4 Managed
4.3
4.1 4.2 4.4
Organisational
of Knowledge Management
Metrics
Quality
Management
Cultural
Growth
Capacity
Management
3.7
3.1 3.4 3.10
Integrated
Each KPA includes Benefits
Management
Organisational
Focus
Management
& Reporting
Quality
Assurance
Programme
Perception Project
Definition
Management
Awareness
Measures
Use P3M3 to Improve
Performance
Metrics Portfolio, Programme and Project Management Maturity Model (P3M3)
4 Managed 5 Optimising
5.1 5.3
5.2
Proactive Continuous
Technology
Problem Process
Management
Management Improvement
4.3
4.1 4.2 4.4
Organisational
Management Quality Capacity
Improvement Plan
Cultural
Metrics Management Management
Growth
3 Defined
3.2 3.5 3.8 3.11
Centre of
Transition Process Lifecycle Excellence Role
Management Definition Control Deployment
3.7
3.1 3.4 3.10
Integrated
Benefits Organisational Quality
Management
Management Focus Assurance
& Reporting
2.6 2.10
2.2 2.4 2.8
Stakeholder Programme
2 Repeatable
Programme Project Risk
Management Planning &
Organisation Establishment Management
& Comms Control
2.1 2.5 2.11
2.3 2.7 2.9
Business Project Plan’g, Management of
Programme Requirements Configuration suppliers &
Case Monitoring &
Definition Management Management external parties
Development Control
1.2
1.1
1 Initial
Programme
Project
Management
Appropriate KPAs
Definition
Awareness
Step 4
Portfolio, Programme and Project Management Maturity Model (P3M3)
How will you know?
4 Managed 5 Optimising
5.1 5.3
5.2
Proactive Continuous
Technology
Problem Process
Management
Management Improvement
4.3
Baseline Assessment
4.1 4.2 4.4
Organisational
Management Quality Capacity
Cultural
Metrics Management Management
Growth
Step 3
Management Development Networking Establishment
3 Defined
3.7
3.1 3.4 3.10
Integrated
Benefits Organisational Quality
Management
2.6 2.10
2.2 2.4 2.8
Portfolio, Programme and Project Management Maturity Model (P3M3) Stakeholder Programme
2 Repeatable
5.1 5.3
get there?
2.1 2.5 2.11
5.2 2.3 2.7 2.9
Proactive Continuous Business Project Plan’g, Management of
Technology Programme Requirements Configuration suppliers &
Problem Process Case Monitoring &
Management Definition Management Management external parties
Development Control
Management Improvement
1.2
1.1
1 Initial
Programme
4 Managed
4.3 Project
4.1 4.2 4.4 Management
Organisational Definition
Management Quality Capacity Awareness
Cultural
Metrics Management Management
Growth
Step 2
3.3
Training Skills & Inter-group Organisational
Information
Competency Co-ordination & Portfolio
Management Development Networking Establishment
3 Defined
Where do you
3.7
3.1 3.4 3.10
Integrated
Benefits Organisational Quality
Management
Management Focus Assurance
& Reporting
2.6 2.10
want to be?
2.2 2.4 2.8
Stakeholder Programme
2 Repeatable
1.2
1.1
1 Initial
Programme
Project
Management
Definition
Awareness
Good planning?
AVOIDING A
SUCCESSFUL PROJECT
FAILURE
Dr Joe Essien
Successful Project Failure ?
Contradiction in terms
?????
Have we experienced this?
691
Two Types of Failure
Technical
“It doesn’t work”
Effective
“There’s no payoff”
692
Avoiding Failure
Technical Failure
Use the PMBOK
Good project planning
Good technical execution
Manage scope, cost, time, …
Effective Failure
Address the people issues
Early and often
First thought – not a later bolt on
693
Manage The Triangle
Cost
Scope Time
694
Manage The Triangle
Technology
No Change Is An Island™
Process People
695
Research and Experience
Leavitt – 1965
Chaos Study – 1994, 2000
Kasser and Williams – 1997
2004 CIO Magazine Survey
Beer – 1980
696
Why are people the issue?
They don’t like change!
Specifically: They don’t like unknown or unanticipated
change
Prefer control
But will settle for involvement and warning
Their Reactions
Apathy
Passive Aggression
Resistance
Sabotage
697
Usual Solution: Coercion
Because I’m the Mommy; that’s why!
Didn’t work for us as adolescents
Still doesn’t work
Wess Roberts, Leadership Secrets of Attila the Hun
John Kotter: Leading Change
Makes the Project Manager
the Compliance Cop
698
Needed Solution: Involvement
Involve the people in shared success
Promote buy–in
Need to inspire the people
699
Secret to Involvement
Communication!
Key to Communication is –
Listening!
Active listening
Not passive
Includes others “in”
700
Communicate What?
Vision
For the project
For the team
701
How Do Leaders Communicate?
F I S H
Frequent
Integrated
Supportive
Honest
702
What Messages?
About the business – Why?
About the change – What?
About the impact – WIIFM?
About the schedule – When?
703
Not Just Words
Communication = Involvement
Interactive exercises
Team efforts start small
Logo selection – making decisions
Presenting the old system – analysis, empathy
705
Necessary Role Change
Project Manager
Project Leader
706
Transformation To Leadership
Doesn’t happen overnight
Vision is paramount
Must believe in what can be, not what is
Goal Oriented
No one succeeds unless everyone succeeds
Key actions
Inspire
Involve
Inform
Influence
707
Some Project Leadership Tasks
708
Four Key Concepts
No Change Is An Island™
No one succeeds
unless everyone succeeds
Communicate,
communicate,
communicate!
Systems don’t change – People do!
709
Don’t Manage; Lead!
To manage a project
710
DR JOE ESSIEN
AVOIDING THE
COMMON CAUSES OF
PROJECT FAILURE
Take actions to ensure project success
Learning Objectives
This document is primarily aimed at those managing
or otherwise involved in the delivery of projects
across the Government.
Addressing the stated issues should enable you to
increase the success rate on government projects
At the end of this module, you will be able to:
Identify reasons why projects fail.
Prevent project failure.
Be accountable for successful projects.
713
Executive Summary
For small businesses holding government contracts, there are
multiple challenges to ensuring a successful engagement. It is
important to identify these challenges and adequately plan to
avoid common causes of project failure.
Typical causes of project failure occur when the following
criteria for success are not met:
1. on time delivery,
2. on or under budget,
3. acceptance by client based on stated scope of work.
Only a few projects achieve all three criteria. Many more are
delivered which fail on one or more of these criteria, and a
substantial number fail badly enough that they are cancelled.
You can take certain actions which will ensure your contracts
do not fail.
714
Common Causes of Project Failure
Projects often fail because of one or more of the
following five reasons:
1. Poor planning,
2. Lack of leadership,
3. Inadequate knowledge,
4. People problems,
5. Lifecycle problems.
715
Reason 1: Poor Planning
Poor planning can include:
− Lack of communication.
− Not breaking down development into phases or steps.
− Not prioritizing operational activities, objectives.
− Not obtaining stakeholder approval.
− No business plan or inadequate business plan.
− Unrealistic expectations set, e.g., financial investment,
time required, set-up costs.
− Inadequate funding/capital or poor use of funds/capital.
− Lack of time commitment.
− Unrealistic scheduling.
716
Reason 2: Lack of Leadership
Lack of leadership can include:
− Not defining ownership or the leadership structure or
not identifying decision makers.
− Not making decisions timely or decisively.
− Lacking relevant business and management expertise in
areas such as finance, purchasing, selling, production,
and hiring and managing employees.
− Neglecting your leadership role.
− Not having a strategic vision.
− Holding unrealistic expectations of others.
717
Reason 3: Inadequate Knowledge
Inadequate knowledge can include:
− Lacking skills and a proven approach to project
management.
− Failing to price your product or service correctly.
− Not addressing potential risks due to inexperience.
− Not estimating, monitoring, or controlling expenditures.
− Not putting a process in place for measuring and
tracking results.
− Having an incomplete or vague project work plan.
− Using inadequate control systems.
718
Reason 4: People Problems
People problems can include:
− Lacking contact with senior management.
− Lacking leadership.
− Lacking effective project team integration
between clients, the supplier team, and the
supply chain.
− Being unable to resolve conflicts.
− Not having adequate resources due to
under/over estimation of work.
719
Reason 5: Lifecycle Problems
Lifecycle problems can include:
− Failing to clearly and completely define the requirements,
resulting in building the wrong features or gaps in the
features needed.
− Using new or state of the art technology that cause
unanticipated problems.
− Using a poor technical design that does not allow for
modification or is not scalable.
− Changing requirements late in the project and continuing
change requests which cause the project to drift.
− Using technology components that do not fit together as
designed.
− Using poor initial testing techniques that cause repeated
errors.
720
8 Common Issues To Address
1. Lack of clear links between the project and the organization's key
strategic priorities, including agreed measures of success.
2. Lack of clear senior management ownership and leadership.
3. Lack of effective engagement with project stakeholders.
4. Lack of skills and proven approach to project management and risk
management.
5. Too little attention to breaking developments and implementation into
manageable steps.
6. Evaluation of proposals driven by initial price rather than long-term
value for money (especially securing delivery of business benefits).
7. Lack of understanding of, and contact with the industry at senior levels
in the organization.
8. Lack of effective project team integration between clients, the supplier
721
team and the supply/resource chain.
8 Common Issues To Address: Issue #1
1. Lack of clear links between the project and the organization's key
strategic priorities, including agreed measures of success.
Do we know how the priority of this project compares and aligns with our other
delivery and operational activities?
Have we defined the critical success factors (CSFs) for the project?
Have the CSFs been agreed to by suppliers and key stakeholders?
Do we have a clear project plan that covers the full period of the planned delivery
and all business change required, and indicates the means of benefits realization?
Is the project founded upon realistic timescales, taking account of statutory lead-
times, and showing critical dependencies such that any delays can be handled?
Are the lessons learned from relevant projects being applied?
Has an analysis been undertaken of the effects of any slippage in time, cost, scope
or quality? In the event of a problem/conflict at least one must be sacrificed.
722
8 Common Issues To Address: Issue #2
(Slide 1 of 2)
723
8 Common Issues To Address: Issue #2
(Slide 2 of 2)
724
8 Common Issues To Address:
Issue #3
725
8 Common Issues To Address: Issue
#4 (Slide 1 of 2)
4. Lack of skills and proven approach to project management and risk
management.
Is there a skilled and experienced project team with clearly defined roles and
responsibilities? If not, is there access to expertise, which can benefit those
fulfilling the requisite roles?
Are the major risks identified, weighted and treated by the SRO, the Director, and
Project Manager and/or project team?
Has sufficient resourcing, financial and otherwise, been allocated to the project,
including an allowance for risk?
Do we have adequate approaches for estimating, monitoring and controlling the
total expenditure on projects?
726
8 Common Issues To Address: Issue
#4 (Slide 2 of 2)
Do we have effective systems for measuring and tracking the
realization of benefits in the business case?
Are the governance arrangements robust enough to ensure that
"bad news" is not filtered out of progress reports to senior
managers until an adequate resolution is highlighted?
If external consultants (subcontractors) are used, are they
accountable and committed to help ensure successful and
timely delivery?
727
8 Common Issues To Address: Issue #5
728
8 Common Issues To Address: Issue #6
729
8 Common Issues To Address: Issue #7
(Slide 1 of 2)
7. Lack of understanding of, and contact with the industry at senior levels in
the organization.
Have we tested that the industry understands our approach and agrees that it is
achievable?
Have we asked suppliers to state any assumptions they are making against their
proposals?
Have we checked that the project will attract sufficient competitive interest?
Is senior management sufficiently engaged with the industry to be able to assess
supply-side risks?
Do we have a clear strategy for engaging with the industry or are we making
sourcing decisions on a piecemeal basis?
730
8 Common Issues To Address: Issue #7
(Slide 2 of 2)
Are the processes in place to ensure that all parties have a clear
understanding of their roles and responsibilities, and a shared
understanding of desired outcomes, key terms and deadlines?
Do we understand the dynamics of the industry to determine
whether our acquisition requirements can be met, given
potentially competing pressures in other sectors of the
economy?
731
8 Common Issues To Address: Issue #8
732
How to Prevent Project Failure (Slide
1 of 2)
734
Key Takeaways from This Module
For small businesses holding government contracts, there are
multiple challenges to ensuring a successful engagement.
It is important to identify these challenges and adequately
plan to avoid common causes of project failure.
Project failure can be avoided by:
Planning properly.
735
Sources and Citations
TechRepublic.com, Avoid these Common Causes for Project Failure
American Express Open: Common Causes of Project Failure
Adrian Woolcock, ProSidian Consulting, Avoiding the Common Causes
of Project Failure
Project Smart, Top Three Causes of Project Failure
gaebler.com, Why Businesses Fail
Baseline, 4 Steps to Prevent Project Failure
eCommerce Guide, Prevent Project Failure
736
737
Software
Engineering 1
Lesson 7
1.738
Design, Implementation and
Testing
Design, implementation and testing are iterative
activities
The implementation does not “implement the design”,
but rather the design document documents the
implementation!
1.739
Maintenance
Maintenance is the process of changing a system
after it has been deployed.
Corrective maintenance: identifying and repairing
defects
Adaptive maintenance: adapting the existing
requirements
In a spiral lifecycle, everything after
the delivery and deployment of the
first prototype can be considered
“maintenance”!
1.740
Maintenance activities
“Maintenance” entails:
configuration and version management
documentation
Repeatable, automated
tests enable evolution
and refactoring
1.741
Maintenance costs
“Maintenance” typically
accounts for 70% of software
costs! Changes in
Data Formats
17%
Changes in
User
Emergency Requirement
Fixes s
12%
Means: most Routine
project costs Debugging
9%
concern continued Hardware
Other
3%
development after Changes
6% Efficiency
deployment Improvements
Documentation 4%
6% – Lientz 1979
1.742
What you should Know (1)
Why do requirements change?
How can you validate that an analysis model
captures users’ real needs?
When does analysis stop and design start?
When can implementation start?
1.743
What you should know (2)
1.744
745
End of Lessons
Be prepared for your exams!
Dr Joe Essien - (CSC 314) Operating Systems