Se Notes
Se Notes
Software Engineering
Lecture Notes
Instructor
Barbara Hecker
r.1.5-2009
Software Engineering Management SEN 941
Welcome
2
Software Engineering Management SEN 941
The purpose of this group project is to use the concepts and tools that you will
learn in this course in a simulated software development environment. This effort
will include the creation of planning documents, project management plan, the
capture and documentation of requirements, design, coding, and testing. You will
be building a variety of models during this process.
You will accomplish this project working in teams. This will require considerable
coordination. To complete all of the work involved, it will be necessary that team
members carry their fair share of the load. It is recommended that your team
clearly allocate responsibilities and coordinate all deliverables.
Project Grading
The Team Project is worth 70% of your total grade and is broken up into the
following deliverables/percentages. Refer to the course syllabus for specific due
dates.
3
Software Engineering Management SEN 941
Table of Contents
Page
Section One 5
Section Two 19
Requirements Specifications 24
Section Three 30
Section Four 50
Section Five 65
4
Software Engineering Management SEN 941
Section Six 81
Risk Management 81
Section Seven 88
Section Eight 89
Software Metrics 89
Quality Assurance 97
5
Software Engineering Management SEN 941
Section One
Objectives:
Assignments/Activities:
• No deliverables
• Teams (three students each) will be formed
Introduction
"Although managers and practitioners alike recognize the need for a more
disciplined approach to software development, they continue to debate the
manner in which discipline is to be applied. Many individuals and companies still
develop software haphazardly, even as they build systems to service the most
advanced technologies of the day. Many professionals and students are unaware
of modern methods. And as a result, the quality of the software that we produce
suffers and bad things happen. In addition, debate and controversy about the
true nature of the software engineering approach continue." Roger Pressman,
2001
Quality improvement
Reliability
Maintainability
6
Software Engineering Management SEN 941
Time
Money
Customer requirements.
The goal is to bring to the software development process the same rigor and
discipline associated with traditional engineering methods. Software Engineering
evolved during the late 1970's and as Dr. Pressman's quote above attests, we
are still struggling to apply these principles and practices today. This course
introduces you to these various software engineering principles and practices
regarded collectively as a software methodology or software process.
In your academic careers thus far, you most likely have been coding single
applications or programs. Not much formality of process is required. You are the
sole analyst, coder, and tester. You wouldn't have much need for software
engineering. However, when developing large-scale, multi-functional software
systems requiring dozens or hundreds of software engineers to construct, more
formal and rigorous software engineering practices are necessary to ensure their
success and delivery of a quality product.
The first computer built in the early 1950’s doesn’t remotely resemble the
computing devices that we use today. However, the basic computing principles
on which it was built formed the basic foundation for all the advancements that
have followed.
These early devices relied on vacuum tubes to store and transmit data. These
vacuum tubes failed at the rate of 1 every 3 seconds. When a tube failed, the
process it was computing typically failed as well making it necessary to restart
and possibly reprogram the process. It required teams of engineers to diagnose
which tubes failed, correct the problem immediately by inserting a new tube, and
repeatedly restart the failed process. At that rate, it could take days to complete a
single computing task.
There was not any programming "languages" during this period. Computer
programs were written in "machine code" or the manufacturer’s "assembly
language." These programs were tightly coupled to the hardware on which they
ran. A program written on one computer could not be run on another computer of
a different manufacturer or even the same manufacturer of a different model.
The Second Era of computing evolved in the 1960’s. During this time, computers
were still very large (mainframe), very expensive, yet they were markedly more
7
Software Engineering Management SEN 941
reliable than their predecessors. IBM and Honeywell began manufacturing and
marketing computers to large-scale businesses: banking, insurance, etc. The
early business intent for the computers was to store and process data at a rate
faster than human resources were able to do the job. Thus, saving big
businesses big bucks. In addition, the ability to process more data at a faster rate
also meant more revenue.
Software languages began to evolve: Basic, Pascal, Fortran, and later COBOL.
This made programming computers easier. However, Programs were still tightly
coupled to the hardware on which they were written.
The early computer adopters during the Second Era had, by this time, amassed
quite an investment in their mainframe technology and had uncountable numbers
of computer programs written in older languages that were tightly coupled to their
hardware technology. This represented the first dilemma of the software industry.
They tried them all. The result was that some were successful and others were
not, but in either case all were quite expensive. Though they have made some
progress, these large, early adopters are still wrestling with this dilemma today.
8
Software Engineering Management SEN 941
who could relate to the business problems they were attempting to solve.
Though, these new programmers did relate more to the business, they lacked
thorough understanding of the hardware they were using to program. These new
programmers were not as adept at designing computing solutions or
troubleshooting complex computing problems. The traditional four-year
universities were developing Computer Science curricula that concentrated on
producing the new hardware and software language pioneers.
The Fourth Era is mainly defined by the introduction of the personal desktop
computer. Though the business community took early PCs seriously, there was
not much software available for them. The programmers of mainframe and mid-
tier computing systems did not understand much about the technology. Early
PCs came with an operating system (that was an unknown to the users), a few
games, rudimentary word processing, and a crude spreadsheet application. They
were not very fast or powerful. They were largely viewed as toys by the business
world.
However, by the end of the fourth era, advances in microprocessors and the
availability of off-the-shelf PC software for business applications caused the
business community to make large investments in desktop computing. Today,
nearly every white-collar employee has a PC or has access to a PC to perform
major portions of their daily work.
The Internet was also introduced late in the fourth era and has revolutionized
marketing and sales strategies for most businesses.
It is hard to predict what will come next. This past year was filled with technology
markets trying to capitalize on the Internet. Market analysts failed to see any real
value add in most of these products and stock prices fell. As hardware continues
to become faster, better, and less expensive, our software advances will continue
to follow. Wireless technologies and voice recognition have just begun to make
inroads in the market.
In the early days of mainframe computers, limitations of the technology made for
few engineering choices. The end user terminal contained no intelligence. You
had one computer, the mainframe that performed all functions. Few choices for
database structure were available. Networking was performed through phone
9
Software Engineering Management SEN 941
lines via modem devices at short range, storage was a concern, and software
languages were COBOL and perhaps FORTRAN or BASIC. End user input was
via a computer terminal or submitted on paper for input by data entry operators
onto tape or disk storage for batch input.
During the third era of client-server, mid-tier devices and intelligent desktop
computers system design became a little more complex. Terms such as "fat
client" and "thin client" emerged. If the designer chose to put most of the
computing load on the desktop it was termed "fat client." If the designer chose to
put most of the computing on the server or host server with less on the client, it
was termed "thin client." Early desktops were not designed to handle heavy
computing loads and the "fat clients" did not perform well.
How could these systems be in a network together? Wide area networks were
emerging, expensive, and yet they worked. Mid-tier database technologies were
being perfected. There were many questions that emerged, as disparate systems
became part of the same network. For instance, should we offload the database
access (I/O) from the mainframe to the mid-tier? Much was learned through trial
and error using the client-server interaction and now entering the 21st century
even more technology has entered the engineering mix to form a highly complex
computing environment.
It is rare today that a computer system stands alone. It is typically integrated with
other computer systems to form a web of complex data transfers and
synchronization schedules, networking challenges and security concerns. Larger
and larger teams of engineers are required to maintain them, compounding the
complexity of the system.
Software Engineering
10
Software Engineering Management SEN 941
solution. The term "right-sizing" was coined more than a decade ago to indicate
that each of the platforms - personal/desktop computer, mid-range and
mainframe computer each have their strengths and weaknesses that the
engineer must take into account.
The term software engineer is widely used to encompass the various disciplines
involved in software design: data administrators, software architects, security
administrators, programmers, quality assurance specialists and many others
necessary to deliver a final software product.
When an engineer is faced with the task of building a bridge, he/she would not
consider beginning construction until the requirements of the customer were fully
understood, blueprints were drawn and approved by the customer. However,
most software engineers today begin construction of systems before the
requirements are fully understood or before a workable design (blueprint) is
developed. Taking these "shortcuts" has been caused by:
Planning - identify the scope and boundary of the problem, and plan the
development strategy and goals.
Analysis - study and analyze the problems, causes, and effects. Then, identify
and analyze the requirements that must be fulfilled by any successful solution.
11
Software Engineering Management SEN 941
Design - if necessary, design the solution not all solutions require design.
Support - analyze the implemented solution, refine the design, and implement
improvements to the solution. Different support situations can thread back into
the previous steps.
Both the Waterfall and FAST are commonly used in today's software
development environment. FAST, like most modern commercial methodologies is
base on a combination of techniques called best practices. All methodologies
have similarities and common ground. It is up to the development team to decide
on which techniques and practices to use. Most development is done using a
combination of several SDLC models.
Each of the various SDLC models contain a number of different phases. These
phases may be independent, inter-related, or iterated many times. Nevertheless
there are a number of typical phases, which can be identified as existing (in one
form or another) in most models. These are analysis, design, implementation,
testing, and maintenance. These phases are most visible in the waterfall model
(or its variants) but still exist in the other models. Each of these will be discussed
in turn.
12
Software Engineering Management SEN 941
The specification is used to design the system. The specifications are partitioned
to either hardware or software and the structure of the system is established. The
software is typically partitioned into increasingly small components until the
method for implementing each component can be readily outlined. The input to
this phase will be the requirements specification. The output will be the design
documentation, and often component test specifications.
The actual code is written, using the design documentation as a guide. This will
probably also include low-level testing of the individual components that are
developed and integration of these components to produce the final working
system. The input to this phase is the design documentation, and the output is
the program code.
The system is tested to ensure that it adheres to the original user requirements.
This will also test the appropriateness of the whole system, and
identify any deficiencies (as opposed to errors) that need to be rectified. The
input will be the program code, the specification and the acceptance test
requirements. The output will be test reports and the final working system.
What is a Methodology?
13
Software Engineering Management SEN 941
roles to be played in each activity, (3) deliverables and quality standards for each
activity, and (4) tools and techniques to be used for each activity. A true
methodology should encompass the entire system’s development life cycle. Most
modern methodologies incorporate the use of several development tools and
techniques.
The system analyst bridges the communications gap between those who need
the computer and those who understand the technology.
14
Software Engineering Management SEN 941
Systems analysts are people who understand both business and computing.
Systems analysts study business problems and opportunities and then transform
business and information requirements of the business into the computer-based
information systems and computer applications that are implemented by various
technical specialists including computer programmers.
A formal definition:
A systems analyst facilitates the study of the problems and needs of a business
to determine how the business system and information technology can best solve
the problem and accomplish improvements for the business. The product of this
activity may be improved business processes, improved information systems, or
new or improved computer applications, and frequently all three.
• The efficient capture of data from its business source the flow of that data
to the computer
• The processing and storage of that data by the computer
• The flow of useful and timely information back to the business and its
people
15
Software Engineering Management SEN 941
What is a user?
A user is a person, or group of persons, for whom the systems analyst builds and
maintains business information systems and computer applications. A common
system is client. There are at least two specific user/customer groups: system
users and system owners.
Traditionally, most system users were internal users, that is employees of the
business for which a system or application is designed. Today’s user community
includes external users as businesses seek to make their information systems
and applications interoperate with other businesses and the consumer.
Information technology managers and system analysts are making a
demonstrated attempt to get closer to their customers by forming a partnership.
16
Software Engineering Management SEN 941
Lecture Notes: Part 2: Strategies for Systems Analysis and Problem Solving,
and Definition Phases of Systems Analysis.
Structured analysis was one the first formal strategies developed for systems
analysis of information systems and computer applications. It is a process-
centered technique that is used to model business requirements for a system.
The models are structured pictures that illustrate the processes, inputs, outputs,
and files required to respond to business events. Structured analysis introduced
an overall strategy that has been adopted by many of the other techniques –
model-driven development. A model is a representation of reality. Just as “a
picture is worth a thousand words,” most models use pictures to represent reality.
Model-driven development techniques emphasis the drawing of models to define
business requirements and information system designs. The model becomes the
design blueprint for constructing the final system. Modern structured analysis is
simple in concept. Systems and business analysts draw a series of process
models called data flow diagrams that depict the essential processes of a system
along with inputs, outputs, and files. Because these pictures represent the logical
business requirements of the system independent of any physical, technical
solution, the models are said to be a logical design for the system.
17
Software Engineering Management SEN 941
Prototyping
18
Software Engineering Management SEN 941
Data and the processes that act upon that data are combined or encapsulated
into things called objects. The only way to create, delete, change, or use the data
in an object (called properties) is through one of its encapsulated processes
(called methods). Object-oriented analysis (OOA) techniques are used to:
(1) Study existing objects to see if they can be reused or adapted for new
uses, and to
(2) Define new or modified objects that will be combined with existing objects
into a useful business computing application.
19
Software Engineering Management SEN 941
Section Two
Objectives:
Assignments/Activities:
Planning activities
Analysis of the customer requirements
Software design
Software construction (coding)
Testing
Maintenance
Generally, any software development process begins with the "definition phase."
In this phase the software designer/developer gathers and analyzes the
customer’s requirements and begins to develop an overall system design to
satisfy those requirements.
20
Software Engineering Management SEN 941
emerges. The product is delivered to the customer and put into production. Over
time, the customer may request modifications to the product, or sound
engineering practice may dictate modifications to maintain the product’s
technological stability or currency. On-going service enhancements to the
product are generically referred to as the "maintenance phase." Experience over
the past 20 years of software development has shown that maintenance activities
consume anywhere from 30 - 60% of the overall IT resource budget. Much
research has been conducted over the past decade to discover ways to reduce
this expenditure to 20-30% of the IT budget.
The Software Development Life Cycle (SDLC), described above in generic terms,
is referred to by many names, including:
These terms all refer to the same flow of software definition, development,
maintenance, and all umbrella activities in between to deliver quality software
products.
The requirements phase contains all those activities in which you determine what
the system or software is supposed to do. This is where you begin to analyze
what the client asked for, versus what they really want, versus what they need.
Requirements analysis deals with defining in a very specific manner, system or
software capabilities. Design analysts then take over and use those requirements
to formulate the system or software design. During the design phase
requirements are allocated and traced to various parts of the design. Designers
21
Software Engineering Management SEN 941
come up with the blueprints for system and software products. This information is
then passed down to the programmers in the coding phase. Programmers take
the initial designs, in conjunction with the requirements and begin to "make it
happen". In most organizations, the programmers are given the flexibility in
regards to how they implement the designs. Designs are rarely written to a level
of detail in which they tell the programmers exactly what to do. During the coding
phase programmers are responsible for unit testing and first level integration
tests. It is generally accepted that the coding phase ends when the programmers
have completed a series of their own tests. At this point the system or software
product is then handed off to a test team. The test phase is concerned with
testing the reliability of what has been created. Testing usually involves a series
of progressive steps that takes the product through integration, alpha, beta, and
acceptance tests. Test teams also take the initial requirements and trace them
down to the testing activities. In addition to making sure the product works, test
teams are concerned with ascertaining whether all of the requirements were
implemented as stated.
Although there are six major phases in a life cycle model, the activities that occur
in each one, and how they occur are dependent on the type of model in use. The
industry recognizes several different software development models, each with its
own advantages and disadvantages.
22
Software Engineering Management SEN 941
Software
After 30+ years of developing software, early adopters of computers during the
second and early third era have amassed great investments in their software
inventories. The U.S. Government, large insurance companies, and large
banking institutions are still dependent on some of these older, mission-critical
software systems. These older systems are referred to as legacy systems. They
have gone through multiple generations of changes, they were not well designed
in the first place, and the original developers have either left the company or
retired. There typically is not any documentation for these systems or it is so out
of date that no one relies on it anymore.
23
Software Engineering Management SEN 941
Most of the SDLS models utilize some set of standards and documentation. For a
long time the military and industry used Mil-Std 498. This body of standards and
documentation was canceled a couple of years ago. The Mil-Std 498 was
document intensive and followed the traditional Waterfall model of software
development. It has been replaced by a series of new standards such as the
International Standards Organization (ISO) 9000 and the Capability Maturity
Model (CMM).
The ISO 9000 is a series of five standards that apply to a range of industries that
includes software engineering. The standards focus on documenting the process
and measuring the results of implementing those processes. It is very similar to
CMM, but it concentrates on a different set of attributes.
24
Software Engineering Management SEN 941
the heroics of key individuals. If you are not familiar with this model please go to
the Software Engineering Institute at www.sei.cmu.edu and browse the
information they have concerning CMM.
The type of standards and documents used in Mil-Std 498, ISO 9000 and CMM
are basically the same in respecting to coding. Generally, programmers are
expected to following a set of coding standards in an organization. Development
efforts consisting of more than a few programmers cannot afford to have several
people coding differently. Standards are necessary to ensure that everyone uses
the same naming conventions, programming constructs, etc. Consistency in
programming reduces maintenance costs. Documentation in programming
usually consists of a software requirements document or specification (SRD or
SRS), a software design document (SDD), a software version description
document (SVD) as well as unit test plans and a wide range of other
documentation. Software development organizations view program
documentation in a more formal manner.
What you produce for documentation is really dependent on the context in which
you’re writing a program. At a minimum the source code for all programs should
be documented internally with sufficient contents to allow another programmer to
understand what you did. Most people begin a source code file with a header
block of comments that describes what the code is going to do, who wrote it, the
date, etc. Throughout the source file you should comment groups of statements
to add clarity to your code. Additionally, you should create a separate document
that explains where the code is located, what it is used for, how to run it, and how
it is compiled. This level of documentation is appropriate for individual programs
that you write for your own use. Programs written for others and those that are
part of a development effort require documentation far beyond what you do for
your own use. The amount of documentation and the quality of information
greatly impacts the cost of the maintenance phase in a development life cycle.
25
Software Engineering Management SEN 941
1. Scope
The SRD covers those requirements pertaining to the interface, internal
operation, and reporting functions of the XYZ program.
1.1 Identification
This document covers version 1.0 of the XYZ program. At this time a
formal name has not been identified for the program module.
1.2 System Overview
The XYZ program is designed to provide DAP personnel, managers and
software developers with a means to ascertain if specific address records
are contained in the XYZ loadables.
2 Referenced Documents
None at this time.
3 Requirements
3.1 General
The program shall be developed as a 32-bit Windows application using
Visual C++ version 6.0.
The program architecture shall support the multiple document interface
metaphor.
The program shall contain a context sensitive Help facility.
Context sensitive help shall be provided at the screen and menu
levels. It is not necessary to provide context sensitive help at the data
element input level.
The program shall store user define parameters in a parameter file that
can be modified by any ASCII text editor.
Upon startup the program shall attempt to read and make use of the
parameter file.
The program shall validate entries in the parameter file and report to
the user if an existing parameter is no longer valid.
3.2 User Interface - Parameter Settings
The program shall make use of a tab property sheet metaphor
accessible from a drop down menu for user defined program settings.
A "General" property sheet tab shall be created to allow the user to
define and store directory settings for basic program operation that
include local XYZ directory location and output log/report directories.
An example of this type of property sheet is available in the Appendix,
labeled Screen Shot #1.
A "Network" property sheet tab shall be created to allow the user to
define and store network settings, user name and password for access
to the XYZ loadables, and the NDSS location of XYZ loadables. An
26
Software Engineering Management SEN 941
27
Software Engineering Management SEN 941
28
Software Engineering Management SEN 941
Screen Shot #1
Screen Shot #2
Screen Shot #3
29
Software Engineering Management SEN 941
Section Three
Objectives:
Assignments/Activities:
Data Modeling
Physical models show not only what a system ‘is’ or ‘does’, but also
how the system is physically and technically implemented. They are
implementation-dependent because they reflect technology choices, and
the limitations of those technology choices.
30
Software Engineering Management SEN 941
implemented or the way that any one person thinks the system might be
implemented. Logical models reduce the risk of missing business requirements
because we are too preoccupied with technical details. Logical models allow us
to communicate with end-users in non-technical or less technical languages.
System Concepts
Entities
31
Software Engineering Management SEN 941
Attributes
The pieces of data that we want to store about each instance of a given entity are
called attributes. An attribute is a descriptive property or characteristic of an
entity. Synonyms include element, property, and field. Some attributes can be
logically grouped into super-attributes called compound attributes. A compound
attribute is one that actually consists of more primitive attributes. Synonyms in
different data modeling languages are numerous: concatenated attribute,
composite attribute, and data structure.
Attribute Domains
The values for each attribute are defined in terms of three properties: data type,
domain, and default. The data type for an attribute defines what class of data can
be stored in that attribute. For purposes of systems analysis and business
requirements definition, it is useful to declare logical (non-technical) data types
for our business attributes. An attribute’s data type determines its domain. The
domain of an attribute defines what values an attribute can legitimately take on.
Every attribute should have a logical default value. The default value for an
attribute is that value which will be recorded if not specified by the user.
Relationships
Conceptually, entities and attributes do not exist in isolation. Entities interact with,
and impact one another via relationships to support the business mission. A
relationship is a natural business association that exists between one or more
entities. The relationship may represent an event that links the entities, or merely
a logical affinity that exists between the entities. A connecting line between two
entities on an ERD represents a relationship. A verb phrase describes the
relationship. All relationships are implicitly bi-directional, meaning that they can
be interpreted in both directions. Each relationship on an ERD also depicts the
complexity or degree of each relationship and this is called cardinality. Cardinality
defines the minimum and maximum number of occurrences of one entity for a
single occurrence of the related entity. Because all relationships are bi-
directional, cardinality must be defined in both directions for every relationship.
32
Software Engineering Management SEN 941
The data model for a single system or application is usually called an application
data model. Logical data models have a date focus and a system user
perspective. Logical data models are typically constructed as deliverables of the
study and definition phases of a project. Logical data models are not concerned
with implementation details or technology; they may be constructed (through
reverse engineering) from existing databases. Data models are rarely
constructed during the survey phase of systems analysis. Data modeling is rarely
associated with the study phase of systems analysis. Most analysts prefer to
draw process models to document the current system. Many analysts report that
data models are far superior for the following reasons: (1) Data models help
analysts to quickly identify business vocabulary more completely than process
models. (2) Data models are almost always built more quickly than process
models. (3) A complete data model can be fit on a single sheet of paper. Process
models often require dozens of sheets of paper. (4) Process modelers too easily
get hung up on unnecessary detail.
A Data Flow Diagram (DFD) Level 0 is a single process bubble with all inputs to,
and outputs from, the system represented. Commonly called a ‘Context
Diagram’, it includes providers of data to the desired system and users of the
information formulated from that data as external entities. A sample Context
Diagram is shown below.
33
Software Engineering Management SEN 941
The DFD is a tool that allows us to model the relationships among processes in
terms of the data that is passed between them. The DFD is the most popular tool
used for process modeling with traditional systems.
While the Data Flow arrow and the Data Store arrows look alike, they can be
differentiated by the way they are connected to the other components. The Data
Store View arrows always interface at one end or the other with a Data Store as
shown in this example. The Data Flow arrows always interface between External
Entities or Processes. Data Store Views represent either the requirement of a
process to retrieve stored data in order to accomplish its function, or the capture
of data that will be needed later by some other process. It is important to
understand that the sum of the content of the Data Store Views correlates
directly to the requirements for data in the ERD, and ultimately the database
itself.
34
Software Engineering Management SEN 941
DFDs are built in 'leveled sets' that begin with a single process and are
progressively portioned until the required detail is documented. Sometimes this
means literally thousands of processes. For now, let's assume that the diagrams
we built covered the entire scope of our system. If this were true, it would be
considered a 'level one' diagram. A context diagram also represents the entire
system, but shows it as a single process with all of the inputs and outputs
interacting with this single process. Often, but not always, the analyst will begin
with the context diagram and build hierarchically from there.
The Context Diagram represents our contract with the user. Essentially we are
saying that the user wants a system that creates a given set of outputs using a
given set of inputs. If our system accomplishes this, the user should be happy.
Process Specifications
Data Flow Diagrams identify the processes and how they are related in the
context of the data that is shared among them. However, at this point the details
necessary to build the system or to understand just how these processes can be
performed is not available. These process details are contained in process
35
Software Engineering Management SEN 941
At all levels above the primitive level the process specification is a general
description that enables the reader to interpret the diagram and navigate their
way to lower level processes.
Above the primitive level the Process Specifications are more general in nature
and are intended to help the reader navigate their way through the set of DFDs
and find the particular Primitive Level Processes of interest. The large hierarchy
that is commonly created when large systems are modeled necessitates them.
36
Software Engineering Management SEN 941
This description lets us know what it going on in the process and enables us to
interpret the process model of which it is a part. However, it would not be
sufficient to enable us to actually perform this process. Provided lower level
processes and descriptions accomplish this goal, it is not a problem.
Once we get to the primitive level the specification becomes much more precise.
Software developers use the specifications from this level to design and code the
system. All of the business rules for transforming the data must be documented
here. The best guideline for writing a primitive level process specification is as
follows: The specification should be written such that if an individual were given
the process specification and an instance of each input to the process, they
would be able to create each of the outputs correctly.
Our business rule for Registration Requests is that they must be submitted two
weeks before the start of the class. Here is a sample Process Description for
‘Verify Registration On Time’:
37
Software Engineering Management SEN 941
This description is clear and detailed. It clarifies that the date we are concerned
with is the date the Registration Request is received, not the date the Request is
filled out or any other date associated with the Request. It clarifies the often-
sticky issue of whether a request that is exactly two weeks early will be accepted
(it would). It also clarifies what to do if part of the required data is missing.
Let’s look at a less precise process description for calculating gross pay in a
payroll system:
This looks pretty clear, and pretty detailed. However, what constitutes Overtime
Hours? Is it hours over 40? What are Evening Hours? When does the Evening
start? Actually, if we did a good job of defining our data in the Data Dictionary we
could probably find answers to both of these questions. But how much should we
pay if some of the hours are both Evening and Overtime? Is it normal pay + 50%
+ 10%? Or perhaps it is normal pay times 150% times 110%. Or, perhaps the
business rule is simply to give them the greater of the two premiums. If we were
to give someone this Process Specification and a sample transaction with this
condition they might not know what to do. Worse yet, two different people given
the same information might do two different things. We can’t afford this type of
ambiguity.
The bottom line for process specifications is that if you provide a narrative that
describes very specifically what you want from the system, you will get a system
that does very specifically what you want it to do. If you provide narratives that
describe in general what you want from the system, you are likely to get a system
that generally does what you want it to. The choice should be clear.
Structured English
38
Software Engineering Management SEN 941
When a student tries to register for a class, the following process is followed:
Entity Relationship Diagrams (ERDs) are the primary tool for representing the
data associated with a software application development effort. The ERD
represents all data that is input, stored, transformed, and produced within a
software application. ERDs consider data independent of the processing that
transforms that data. They represent data in a logical way that can be translated
into any number of physical structures.
Assume we are told that an employee works for one branch (part of a company)
and that each branch can have many employees. The relationship between
employee and branch would look like this:
However, we may have employees who are fire marshals. These fire marshals
are responsible for performing periodic inspections on their own and other
branches to make sure they are practicing proper fire safety and to make sure
that they follow proper procedures during fire drills. An employee can be a fire
marshal for several branches, and each branch can have only one fire marshal.
We would model this relationship like this:
39
Software Engineering Management SEN 941
So which relationship is correct? Actually, both are correct, and both need to be
named and modeled if the relationship has some relevance to the system we are
implementing. (Perhaps we have a requirement that a ‘Fire Marshal report’ be
produced). The main point here is that the relationships are not always obvious
and that it is the role of the analyst to identify all relevant relationships and model
them appropriately.
When we build our DFD’s we include a symbol called the Data Store.
Conceptually, the data represented by the Data Stores in a DFD and the data in
an ERD are the same. However, the ERD representation is superior because it
focuses on the natural structure of the data.
The individual Data Stores in a DFD are tied to specific processes and represent
a more limited, process oriented view. They are necessary so that we can
represent how the process interacts with the stored data of the system and
understand those processes fully. However, any database structures we build
later will be built from the ERDs, not the DFD’s. Sometimes analysts can get
bogged down trying to show the structure of the data on the DFD. That isn’t
necessary, as we have already captured this structure on the ERD.
In fact, it is not an effective use of time to focus too closely on the specific Data
Stores at all. Name them quickly to make the diagrams readable and use your
time elsewhere. Focus instead on the content of the Data Store Views. The
individual view for each process may tie together multiple files - or entities. This
can be documented in the definition of the Data Store View by including each of
the specific elements that are retrieved and the key that is used to retrieve that
data. We can then look at the various entities where this data is stored and
determine what the relationship is for that particular process.
40
Software Engineering Management SEN 941
For example, let’s look at a simple inquiry process. In this process an Advisor
submits an inquiry that contains only a Student ID. In response they want to get
the name and address of the student, along with the name of each of the courses
the student has taken, the date of the class, and the name and phone number of
the teacher who taught this class.
This data would be spread out over several entities, including Student, Course,
Class (an occurrence of a Course), and Instructor. When building our DFD we
want to model the relationship between the ‘Process Advisor Inquiry’ process and
the stored data of the system. Do we need to show several Data Stores? No. We
can simply show one Data Store View and define it with a structure that shows
the key and the related data. Here is how that might look for a Data Store View
that we chose to call Student Inquiry Details:
We show this arrow leaving the ‘Process Advisor Inquiry’ process bubble, but
where does it go? The answer is a Data Store, but which Data Store? We don’t
need to show four different Data Stores and how they are related. Just make up
a Data Store name that makes the diagram readable (Student Inquiry Data, or
simply Stored Data, may work). Let the structure of the date remain in the ERD
where it belongs.
This step involves identifying the key for each of the Data Store Views and
checking to make sure that the particular key structure exists in the ERD and can
be used to retrieve any required data elements. This is a tedious and time
consuming process if done manually, but is virtually automatic when using a
robust CASE tool.
41
Software Engineering Management SEN 941
Like processes, the data components on DFD’s (data flows and data store views)
simply represent the data - they do not describe precisely the data that is
represented. To determine this we must look beyond the DFD to the data
definitions. Every Data Flow and Data Store View must be defined in terms of its
data elements. These definitions are stored in the Data Dictionary.
If we look back at our previous DFD example we will find a Data Flow entitled
‘Time Card.’ The Time Card is submitted at the end of the pay period so the
employee may be paid. It must identify who is being paid and how many hours
they worked. While we may have some idea of what this means just from the
name Time Card, it is important that we define it precisely if we are to use it in
constructing software.
If we consider the purpose of the Time Card we could conclude that it would
normally include the Employee ID (who are we paying), a Date (what pay period
are we paying them for), and the number of Hours (how much work will we be
paying them for).
Time Card
Employee ID
Date
Hours
To define this data flow for inclusion in our formal specification we need to be
precise in our naming. It should be clear what each data element is and what it
describes. We should preclude the potential that data elements may be confused
with one another, particularly in very large systems.
The name ‘Employee ID’ is pretty good. It is the ID (or Identifier) of the
Employee. We won’t need to change this one.
But what about ‘Date?’ What date are we referring to? What does this date
describe? Is this the date the Time Card was submitted or the date the date they
pay period ends? Will we be able to distinguish this date from all of the other
dates in the system? This date happens to be the last date of the pay period, so
let’s make that clear by renaming it as ‘Pay Period End Date.’
Now what about ‘Hours?’ We can probably figure out that this is the number of
Hours that the employee worked, but why take a chance that someone might
misinterpret it? Let’s make it clear by renaming this element ‘Employee Hours
Worked.’
42
Software Engineering Management SEN 941
Names sometimes get pretty long when we start to describe them as we have
above, especially in large systems where many transactions contain similar data
elements. However, this is a small price for effectively communicating our
requirement.
TIME CARD
Employee ID
Pay Period End Date
Employee Hours Worked
One additional item that we might add to this definition is an indication of the
‘key.’ We will have many Time Cards flowing into our system. What is it that
makes each Time Card unique? Your first thought might be the ‘Employee ID.’
This would be unique for each employee, but over the course of time we are
going to pay each employee many times (every week, every two weeks, every
month, or whatever the pay cycle turns out to be). To uniquely identify every
occurrence of this data flow we would need to use the combination of Employee
ID and Pay Period End Date. We should never have two transactions with this
same combination of values.
The key is often indicated with an asterisk before the data element names such
as this:
TIME CARD
*Employee ID
*Pay Period End Date
*Employee Hours Worked
Keys are important, especially for Data Store Views. It is the key that identifies
how we want to access the data and can be used to build SQL-like statements
for data access. All of our Data Flows and Data Store Views must be defined in
this fashion.
This is just the start of our data definition effort. Next we must make sure that
every data element is itself defined. There are several components to the data
element name. At a minimum we should include the length, possible values or
validation criteria, data format, any aliases, and a brief narrative description.
Employee Hours Worked would be a two position numeric field. Can it contain
any numeric value? Probably not. We might not want any Time Cards with a
value of zero, so we could set a lower limit of 1.
43
Software Engineering Management SEN 941
We might have an upper limit as well. If this is a weekly Time Card there are only
168 hours (24*7) in the week. However, a more reasonable limit might be 80 or
90, since no one can really work 168 hours. Of course, if we set the limit too low
and someone works an incredible number of hours in a heroic effort to complete
a task on time it would be a shame for his or her Time Card to reject. So what do
we do?
The answer is that we follow the business rule that the company follows.
Validation criteria need to be documented in the requirements specification, but
they are defined first by the user of the system. Talk to the customer, find out
what the business rules are, and capture them in the data definition. The purpose
of the specification is to communicate business rules between the customer and
the software engineer.
As for the narrative, this allows us to say more about the data element than we
could reasonably put in the name itself. In this case we might simply say: "The
number of hours an employee works in a given pay period." This is simple, clear,
and absolutely essential for large complex systems.
Functional aliases are names that are used in the business world. It may be that
the end user commonly refers to Employee Hours Worked as Payroll Hours.
That’s OK. They don’t have to use our name, and we probably couldn’t get them
to change if we tried. But we do want to capture their name as an alias and enter
it into our automated dictionary tool. That way if someone is researching the
definition they will be sure to find it. Alias support is a common function of any
robust data dictionary tool.
Technical aliases are names that are used in the implementation of software.
The programming language that we use may have restrictions that prohibit the
use of long names (some early languages limited data names to 8 characters).
Or, we may simply find it cumbersome to enter lengthy names during the coding
process (not to mention the increased opportunity for typos that long names
allow). Technical aliases allow us to define any name we like to reference a data
element. Provided we enter it as an alias in the data dictionary our alias support
feature will always tie us back to the proper definition and business rules.
As you might guess, uniqueness is an issue for both the official name of a data
element and all of its aliases. If we find ourselves trying to use the same name to
refer to two different things, no automated tool is going to be able to help us sort
out the confusion. A good dictionary will not allow you to enter duplicates.
If you follow the steps above you will come up with pretty good definitions for all
of your data. You will capture the user’s requirements completely. You will also
44
Software Engineering Management SEN 941
capture all of the information that the developer needs to create the databases
and program code.
Architecture
Modularity
Modules with single-minded functions, with simple interfaces, that are easy to
develop and maintain, and with reduced error propagation and increased
reusability are considered functionally independent. Ideally all modules within a
design should be functionally independent, although this goal is unrealistic.
Transform Analysis
Transaction Analysis
45
Software Engineering Management SEN 941
Design Patterns
A Design Pattern names, abstracts, and identifies the key aspects of a common
design structure that make it useful for creating a reusable design. A Pattern
must identify the components, their roles, and their relationships. A Design
Pattern leads to reusability of software by allowing previously developed
structures to be used to solve similar, but new, problems.
Requirements Traceability
Boss Module
A boss module is a management module within a structure chart that does not
execute the functionality of the module, but rather controls the activities of other
modules. The higher levels of modules within a design structure tend to be boss
modules. A goal of an effective design should be to separate work and
management and to limit the functionality of boss modules strictly to the control
of lower level processes.
Control Couple
Data Couple
A data couple is a data item that is passed from one module to another so that
the receiving module can use the data to accomplish its function. One goal of an
effective design is to limit the passing of data among modules to only that data
that is specifically needed by the receiving module. Modules within a design are
commonly reorganized to minimize data coupling.
46
Software Engineering Management SEN 941
Verification
The term Verification refers to the concept of determining that we are building the
product correctly. It assumes that the requirement is stated and interpreted
properly and focuses on the way we have implemented that requirement.
Validation
The term Validation means to determine whether we are building the correct
product. Validation ascertains that we correctly understand the requirement.
Your final analysis document should be one complete document, not separate
files. You can import to MS Word from other software packages. There must be a
table of contents and the pages must be numbered. Your analysis document
needs to include the following sections and content:
1. Introduction
The Introduction section should be written so that anyone reading it can have
a good idea of what the project is intended to accomplish. This entire section
is normally completed in narrative format (no models required).
You will be asked to create data and process models for a project with a
fairly broad scope. It would not be reasonable to code the entire project
during this term. Therefore, you will be asked to develop a working
prototype for this project. Your objectives statement should clearly
describe the objectives for both the documentation of the broad project
deliverable and the narrower working prototype.
47
Software Engineering Management SEN 941
A list of constraints that may limit what you are able to accomplish or how
you can accomplish it. The fact that you have a limited amount of time to
complete the project would be considered a constraint.
Create a list of assumptions that you are making about the project. It is not
practical, or necessary, to clarify every point about the project with the
instructor. For minor points, you are welcome to make assumptions,
provided that the assumptions are reasonable and do not change the
purpose of the assignment. For example, if the project required that you
calculate discounts for customer orders over a certain dollar threshold,
and the threshold was not specified, it would be acceptable to ‘make up’ a
threshold. When you make such assumptions, document them in this
section.
2. Functional Requirements
ERD showing all entities involved with the entire scope of the project, not
just the prototype. The database delivered with the prototype must be
consistent with the ERD. Entity Descriptions in narrative format that clarify
what each entity represents to someone who might not be familiar with the
business area being modeled. Attribute Definitions for each of the
attributes in each entity. Should include length, data type, possible values,
edit criteria, and a unique data element name.
Must cover the scope of the entire project. Must include a Context Level
diagram and one or more lower level diagrams as needed to represent a
Process Bubble for each major process within the entire proposed system.
Must include a Primitive Level process bubble for every process in the
working prototype. Consistency of data between levels must be
maintained. No more than nine processes should be present on any given
diagram.
48
Software Engineering Management SEN 941
Process Descriptions
Design Specification
Component/Deployment Diagrams
Test Plan
Test Case Grid in specified format. Grid should identify at least 15 test
transactions. Content of each transaction, including specific input values,
must be identified. Predicted results should be included.
49
Software Engineering Management SEN 941
Section Four
Objectives:
Assignments/Activities:
• No deliverables
While the tools and languages we have used to build software have evolved over
time, the fundamental way we went about organizing our software has remained
essentially the same. We organized processes into hierarchical structures
(systems, subsystems, programs, modules) and these process structures
interacted with separate data structures (databases).
50
Software Engineering Management SEN 941
To resolve these issues we use different tools than we did in traditional software
development. Instead of DFDs and ERDs we use UML models Class Diagrams,
Sequence Diagrams, and Use Case Scenarios. The steps in the process we
follow are different as well. Analysis and design overlap much more than they do
in traditional development. The same models are often used throughout the
software engineering process.
New terms for the phases of software engineering have been introduced. Instead
of analysis, design, coding, and testing, we have inception (defining the business
rationale for the project), elaboration (high level analysis and design and the
construction of a plan that drives construction), construction (the rough
equivalent of coding), and transition (includes not only testing, but also training
and implementation).
Since the same models are used in various phases of the process we
differentiate not by the models we use, but by the perspective we take in building
those models. There are three perspectives: conceptual, specification, and
implementation.
So, while the goal of software engineering is the same for OO and traditional
systems the way we go about achieving that goal differs. Many of the differences
are subtle, while others are quite dramatic.
51
Software Engineering Management SEN 941
Objects
An object is like a module that contains both data and the instructions that
operate on those data. Data are stored in instance variables; the instructions for
their manipulation are defined inside methods. Methods are explained in the
"Messages and methods" section below. An object in programming can be
compared to a real world object. For example, a desk is an object that has the
following characteristics:
• color
• dimensions
• parts (e.g. drawers)
• etc...
• add part
• remove part
• change color
• etc...
A method is a procedure or function that determines how the object will respond
to the request. Methods provide the only way to manipulate the instance
variables of the object. They may also send messages to other objects
requesting action or information.
52
Software Engineering Management SEN 941
• Abstraction
• Polymorphism
• Inheritance
• Encapsulation
Abstraction
Polymorphism
Objects are smart enough to be dynamic. Specifically, they have the ability to
react differently depending on the situation. This is important because it makes
the API (application programming interface) dependable and easy to understand
for the incoming developer. Consider this example: Suppose you have a method
called "print()." The first question you might ask is, "what does this method print:
pictures, text, or what?" Using "polymorphism," an object can be made to handle
any scenario with the exact same method name. Depending on what the object is
asked to print, it will be able to print it. Instead of having separate methods like
printPicture(), printLetters(), and printNumbers() you have one unified print() and
the object itself determines how to handle the different types of situations.
53
Software Engineering Management SEN 941
Inheritance
This may sound like simply creating a copy of the old class, just as we would do
with a module in an imperative language. However, this is not what happens
internally. What really happens is that the implementation of the old class is NOT
duplicated! Instead, the new class knows that the implementation already exists
in its parent, so it simply uses it from there. In other words, there is a binding
between the two classes, thus avoiding any compilation of code that need only
be compiled once.
Encapsulation
Objects are "little black boxes of functionality." Nobody but the object itself needs
to know anything about how its properties and methods are defined and
implemented. Is the list of items stored in an array or a vector? How is sorting
handled, with a quick sort or a bubble sort? How is a selection marked and how
do you handle multiple selections? Encapsulation means that the answers to all
these questions are private, known only by the object itself.
The benefit is that if you want to use a "Select Box," you do not need to deal with
all of the complex code that handles all of the functionality of a select box.
Instead, you just put the self-contained select box object in your application and
use it. This is an incredibly useful concept because it means that it is far easier to
54
Software Engineering Management SEN 941
modify and understand code because you only need to deal with small pieces of
code at any one time. As a developer, you do not need to deal with the intricacies
of the select box functionality you just use the thing! It is also a good metaphor
for the real world that can be thought of as being made up of encapsulated
objects. Consider the computer you are using to read this. Do you know how the
CPU works? Most likely you don't. But that is fine. It works regardless. And the
fact that you don't have to spend time learning electrical engineering means that
you are free to spend your time building things "using" the CPU.
It's also possible to use objects and messages in plain old non-object-oriented
languages. This is done via function calls, which look ordinary, but which have
object-oriented machinery behind them. Suppose we added a "plus" function to a
C program:
This hasn't really bought us anything yet. But suppose instead of doing the
addition on our own computer, we automatically sent it to a server computer to
be performed:
The function server_plus() in turn creates a message containing arg1 and arg2,
and sends this message, via a network, to a special object that sits on a server
computer. This object executes the "plus" function and sends the result back to
us. It's object-oriented computing via a back-door approach!
This example is not very fancy, and, of course, it's easier to simply add two
numbers directly. But as the example illustrated, there's no limit to the complexity
of an object. A single object can include entire databases, with millions of pieces
of information. In fact, such database objects are common in client-server
software.
55
Software Engineering Management SEN 941
An abstract data type (ADT) is a data type defined only in terms of the operations
that may be performed on objects of the type. Users (programmers) are allowed
to examine and manipulate objects using only these operations and they are
unaware of how the objects are implemented in the programming language. The
programmer defines the data type - its values and operations - without referring
to how it will be implemented. Applications that use the data type are oblivious to
the implementation: they only make use of the operations defined abstractly. In
this way the application, which might be millions of lines of code, is completely
isolated from the implementation of the data type. If we wish to change
implementations, all we have to do is re-implement the operations. No matter
how big our application is, the cost in changing implementations is the same. In
fact often we do not even have to re-implement all the data type operations,
because many of them will be defined in terms of a small set of basic core
operations on the data type. Object-oriented programming languages must allow
implementing these types. Consequently, once an ADT is implemented you have
a particular representation of it available.
Consider the ADT Integer. Programming languages such as Pascal, C, Java and
others already offer an implementation for it. Sometimes it is called int or integer.
Once you've created a variable of this type you can use its provided operations.
i = 1; /* Assign 1 to integer i */
j = 2; /* Assign 2 to integer j */
k = i + j; /* Assign the sum of i and j to k */
Let's play with the above code fragment and outline the relationship to the ADT
Integer. The first line defines three instances i, j and k of type Integer.
Consequently, for each instance the special operation constructor should be
called. In our example, this is internally done by the compiler. The compiler
reserves memory to hold the value of an integer and "binds'' the corresponding
name to it. If you refer to i you actually refer to this memory area which was
"constructed'' by the definition of i. Optionally, compilers might choose to initialize
the memory, for example, they might set it to 0 (zero).
56
Software Engineering Management SEN 941
i = 1;
sets the value of i to be 1. Therefore we can describe this line with help of the
ADT notation as follows: Perform operation set with argument 1 on the Integer
instance i. This is written as follows: i.set(1).
We now have a representation at two levels. The first level is the ADT level
where we express everything that is done to an instance of this ADT by the
invocation of defined operations. At this level, pre- and post-conditions are used
to describe what actually happens. In the following example, these conditions are
enclosed in curly brackets.
Don't forget that we are currently talking about the ADT level. Consequently, the
conditions are mathematical conditions.
k = i + j;
Obviously, "+'' was chosen to implement the add operation. We could read the
part "i + j'' as "add the value of j to the value of i'', thus at the ADT level this
results in
The post-condition ensures that i and j do not change their values. Please recall
the specification of add. It says that a new Integer is created the value of which is
the sum. Consequently, we must provide a mechanism to access this new
instance. We do this with the set operation applied on instance k:
57
Software Engineering Management SEN 941
Programmer-Defined Classes
class Integer {
attributes:
int i
methods:
setValue(int n)
Integer addValue(Integer j)
}
In the example above as well as in examples that follow we use a notation that is
not programming language specific. In this notation class {...} denotes the
definition of a class. Enclosed in the curly brackets are two sections attributes:
and methods: which define the implementation of the data structure and
operations of the corresponding ADT. Again we distinguish the two levels with
different terms: At the implementation level we speak of "attributes'' which are
elements of the data structure at the ADT level. The same applies to "methods''
which are the implementation of the ADT operations.
In our example, the data structure consists of only one element: a signed
sequence of digits. The corresponding attribute is an ordinary integer of a
programming language. We only define two methods setValue() and addValue()
representing the two operations set and add.
class date
{
public:
void changeDate(int month, int day, int year);
58
Software Engineering Management SEN 941
void displayDate();
private:
int month;
int day;
int year;
};
date payDay;
Objects
Consider the concept of employees working for a company. You can talk of
instances of abstract employees. These instances are actual "examples'' of an
abstract employee, hence, they contain actual values to represent a particular
employee. We call these instances objects.
Objects are uniquely identifiable by a name. Therefore you could have two
distinguishable objects with the same set of values. This is similar to "traditional''
programming languages where you could have, say two integers i and j both of
which equal to "2''. Please notice the use of "i'' and "j'' in the last sentence to
name the two integers. We refer to the set of values at a particular time as the
state of the object.
Messages
A running program is a pool of objects where objects are created, destroyed and
interacting. This interacting is based on messages that are sent from one object
to another asking the recipient to apply a method on itself. To give you an
understanding of this communication, let's come back to the class Integer
presented above. In our pseudo programming language we could create new
objects and invoke methods on them. For example, we could use
59
Software Engineering Management SEN 941
to express the fact, that the integer object i should set its value to 1. This is the
message "Apply method setValue with argument 1 on yourself.'' sent to object i.
We notate the sending of a message with ".''. This notation is also used in C++;
other object-oriented languages might use other notations, for example "-''.
In our example, the message and the method which should be applied once the
message is received have the same name: We send "setValue with argument 1''
to object i which applies "setValue(1)''.
Conclusion
How does this concepts help us developing software? To answer this question
let's recall how we have developed software for procedural programming
languages. The first step was to divide the problem into smaller manageable
pieces. Typically these pieces were oriented to the procedures that were taken
place to solve the problem, rather than the involved data. As an example
consider your computer. Especially, how a character appears on the screen
when you type a key. In a procedural environment you write down the several
steps necessary to bring a character on the screen:
60
Software Engineering Management SEN 941
Stages in OO Development
61
Software Engineering Management SEN 941
1. Use Case
2. Class Diagram
3. Interaction Diagram (including both the Sequence Diagram and the
Collaboration Diagram)
4. State Diagram
5. Activity Diagram
6. Component Diagram
7. Deployment Diagram
In the context of a Use Case diagram, the Extend syntax represents a link to
another Use Case that extends the functionality of the parent Use Case. The Use
Case that invokes it only sometimes references a Use Case referenced by an
Extend. Extend can be used to simplify complex Use Cases by extracting a part
of the use case and setting it ups as a separate component.
In the context of a Use Case diagram, the Include syntax represents a link to
another Use Case that is always included in the parent Use Case, but may also
be included in other Use Cases. The Use Case that invokes it always references
a Use Case referenced by an Include. Include can be used both to simplify
complex Use Cases, and also to increase reusability. Reusability is increased
because the Included Use Case can be used anywhere the same functionality is
required.
A Use Case simply represents an interaction between an external entity and the
target system. The processing represented by that Use Case is defined in a Use
Case Scenario. A Use Case Scenario focuses on a single Use Case and a
specific event associated with on occurrence of that Use Case. It lists the
individual steps involved to accomplish the function represented. If the steps
would be different under different conditions, a different Use Case Scenario
would be developed for each potential set of conditions.
62
Software Engineering Management SEN 941
Deployment Diagram
Component Diagram
Interaction Diagrams
The Interaction Diagram addresses the Dynamic View of the system. The
diagrams represent Objects and relationships – including the messages that are
passed among those objects. They show how objects communicate in the
context of accomplishing some function. They normally focus on only one Use
Case and one or more scenarios.
Sequence Diagram
Collaboration Diagram
State Diagram
63
Software Engineering Management SEN 941
Activity Diagram
An Activity Diagram is a special type of State Diagram that shows flow from
activity to activity. They are useful for describing workflow and behavior that
involves parallel processing. Activity Diagrams are not always created, but are
available when it is considered important to show this flow across activities. They
are also very useful in modeling concurrent activities.
64
Software Engineering Management SEN 941
65
Software Engineering Management SEN 941
Section Five
Objectives:
Assignments/Activities:
Transform Analysis
One approach used to derive a program structure chart from program DFD is
transform analysis. Transform analysis is an examination of the DFD to divide the
processes into those that perform input and editing, those that do processing or
data transformation (e.g., calculations), and those that do output. The portion
consisting of processes that perform input and editing is called the afferent. The
portion consisting of processes that do actual processing or transformations of
data is called the central transform. The portion consisting of processes that do
output is called the efferent. The strategy for identifying the afferent, central
66
Software Engineering Management SEN 941
Step 1 - Beginning with the input data flow, the data flow is traced
through the sequence until it reaches a process that does
processing (transformation of data) or an output function.
Step 2 - Beginning with an output data flow from a path, the data
flow is traced backwards through connected processes until a
transformation processes is reached (or a data flow is encountered
that first represents output).
Once the DFD has been partitioned, a structure chart can be created that
communicates the modular design of the program.
67
Software Engineering Management SEN 941
Transaction Analysis
As a systems analyst, you are responsible for packaging that set of design
documentation into a format suitable for the programmer. This package is called
a technical design statement. The technical design statement should include all
data, process, interface, and geography building block specifications developed
by the designer.
Object-Oriented Design
Design Objects
The objects that represented actual data within the business domain in which the
user was interested in storing were called Entity Objects. Objects that represent
a means through which the user will interface with the system are called Interface
Objects. Objects that hold application or business rule logic are called Control
Objects. A system’s functionality is distributed across all three types of objects.
This practice makes the maintenance, enhancement, and abstraction of objects
simpler and easier to manage. The three object types correlate well with the
client-server model. The client is responsible for the application logic (control
68
Software Engineering Management SEN 941
Entity Objects
Entity objects usually correspond to items in real life and contain information
known as attributes that describe the different instances of the entity. They also
encapsulate those behaviors that maintain its information or attributes. An entity
object is said to be persistent meaning the object typically outlives the execution
of a use case (or program). An entity object exists between use case executions
because the information about that entity object is typically stored in a database
(allowing for later retrieval and manipulation).
Interface Objects
It is through interface objects that the users communicate with the system. The
responsibility of the interface object is two fold:
• It translates the user’s input into information that the system can
understand and use to process the business event.
• It takes data pertaining to a business event and translates the data for
appropriate presentation to the user.
Each actor or user needs its own interface object to communicate with the
system. In some cases the user may need multiple interface objects.
Control Objects
Control objects contain behavior that does not naturally reside in either the
interface or entity objects. Such behavior is related to the management of the
interactions of objects to support the functionality of the use case. Controller
objects serve as the "traffic cop" containing the application logic or business rules
of the event for managing or directing the interaction between the objects.
Controller objects allow the scenario to be more robust and simplifies the task of
maintaining that process once it is implemented. As a general rule of thumb,
within a use case, a control object should be associated with one and only one
actor.
Object Responsibilities
69
Software Engineering Management SEN 941
Object Reusability
Coupling and Cohesion are the two primary measure of the quality of design for
both OO and traditional systems. Coupling is a measure of the interdependence
between modules - how much data and control needs to be passed to enable our
overall design to function. Coupling should be minimized. Cohesion is a measure
of the strength of association of the components within a module - did we
package code that belongs together. Cohesion should be maximized. In
traditional design there are six levels of coupling:
1. Content
2. Common
3. External
4. Control
5. Stamp
6. Data
Content Coupling
In Content coupling one module directly references the content of another. This
cannot be accomplished in many programming languages. However, it can be
done in machine languages and assembly languages - languages that are tied
closely to the internal structure of the machine. Content coupling was also
possible in the early days of Cobol using the ‘alter’ verb. When Content coupling
is used it is generally where the efficiency of the code is of critical importance. In
content coupling a module can actually change a code statement in another
70
Software Engineering Management SEN 941
Common Coupling
Common coupling is where two modules have access to the same global data.
Again, it is not generally found with most modern programming languages.
Normally you can define data as being either local or global. When data is
defined as local only the local modules can modify it. This makes maintenance
easier because when we have a bug we can identify one or a few modules that
could have modified the data and created the bug. With Common coupling it is as
though all of the data was defined as global. Every parameter is passed from
module to module. If a bug occurs we have no way of knowing where it was
introduced because the data could have been modified anywhere within the
design. If we were going to model common coupling it would look like the
following:
External Coupling
71
Software Engineering Management SEN 941
Stamp Coupling
Stamp couples are a much less dramatic form of common coupling. Stamp
coupling is the passing of a data structure where not all elements in the structure
are used. The following example shows the passing of the entire employee
record from the boss module to Calculate Gross.
The Payroll Record contains SSN, Name, Address, Org Code, Date of Birth, and
Hourly Rate. The Calculate Gross only needs the SSN and Hourly Rate to do its
job. The passing of the extra elements makes this a stamp couple. Stamp
couples are very common and are not generally a problem. However, the
potential exists that the extra data could lead to additional maintenance if an
72
Software Engineering Management SEN 941
unused element was changed, leading to a change in a module that does not
even use that data. Stamp couples can be eliminated simple by changing the
design to pass only what is needed.
This reduction in coupling makes a module that is easier to maintain and more
likely to be reused.
Data Coupling
Data coupling is the least intrusive form of coupling. In Data Coupling every
argument is either a simple argument or a data structure in which all elements
are used by the called module. The example above that factored required data
out of the stamp couple represents data coupling where only the data needed by
Calculate Gross is passed.
Cohesion
Just as there are levels of Coupling, there are levels of Cohesion, in this case,
seven.
1. Functional
2. Informational
3. Communicational
4. Procedural
5. Temporal
6. Logical
7. Coincidental
Functional Cohesion
73
Software Engineering Management SEN 941
Informational cohesion exists when output from one element in the module
serves as input for some other element. All elements are part of a series of
actions and all of the actions contribute to the same general function, however,
the complete function is not accomplished.
Elements in a module with this type of cohesion are organized with function in
mind and provide a better isolation of functionality than in communicational
cohesion (the next level on our list). Reuse is somewhat limited, because the
module is only usable in an identical environment. For example, if there is a
situation where there is a need to Calculate Gross Pay, but not Calculate Sales
Tax, we would not be able to use this module. Informational cohesion is
considered an acceptable form of cohesion, but can be improved simply by
breaking the module into two components - in our example one to calculate gross
pay and a second to calculate State Tax.
Communicational Cohesion
In communicational cohesion the module performs more than one function, and
these functions are all performed on the same body of data. All of the data is
passed among the elements of the module.
Example: Update the record in database and record the record in the audit
trail. These components use the same data but perform two different
functions.
74
Software Engineering Management SEN 941
Procedural Cohesion
In procedural cohesion a module performs more than one function, and these
functions are only related to a general procedure affected by the software.
Example: Plot graph R2 on plotter and print report XYZ. Where the
information on graph R2 and report XYZ are not related.
Although the relationship among the functions is not strong, there is at least
some relationship based on the type of procedure that is performed. However,
this re relationship is based on the program (design) procedure rather than the
problem (requirement) procedure. Reusability is adversely impacted whenever
we focus on procedure as a basis for organizing modules.
Temporal Cohesion
In temporal cohesion a Module performs more than one function, and the
functions are related by the fact that they must occur within the same time span.
Example: Create year-end tax statements and post Cost of Living increase for
next year. These two modules are related because they both occur at the end
of the calendar year. The designer may decide to put them together in the
same module (or program) based on this relationship. This is a weak
relationship that decreases the potential for reuse and increases the cost of
maintenance and testing.
75
Software Engineering Management SEN 941
Logical Cohesion
Under Logical Cohesion a module performs more than one function and these
are only related ‘logically’ based on some perceived commonality of process.
Example: A module that adds New Employees, New Customers, and New
Inventory Items.
Coincidental Cohesion
Clearly in this case changes to one function could have a ripple effect on other
completely unrelated functions. Such inadvertent impacts would be totally
unpredictable. Data and Control Coupling would be increased and reusability
would be nonexistent.
76
Software Engineering Management SEN 941
1.0 Introduction
This section provides an overview of the entire design document. This document
describes all data, architectural, interface and component-level design for the
software.
Any business or product line constraints that will impact the manner in
which the software is to be specified, designed, implemented or tested are
noted here.
A description of all data structures including internal, global, and temporary data
structures.
Data structures that are passed among components the software are
described.
Data structured that are available to major portions of the architecture are
described.
2.3 Temporary data structure
77
Software Engineering Management SEN 941
3.1.2 Alternatives
78
Software Engineering Management SEN 941
3.2.3.3 Restrictions/limitations
79
Software Engineering Management SEN 941
Special design issues that impact the design or implementation of the software
are noted here.
Test strategy and preliminary test case specification are presented in this
section.
Those components that are critical and demand particular attention during
testing are identified.
7.0 Appendices
80
Software Engineering Management SEN 941
81
Software Engineering Management SEN 941
Section Six
Objectives:
Assignments/Activities:
• Midterm Exam
If everything on a project remained the same from the preliminary analysis and
estimates, then every project would be successful. It would deliver the expected
product, on time, and within budget. Reality, though, is that nothing remains the
same. Change is certain. These changes are risks to project success.
It is the Project Managers’ job to identify these changes or risks at the very
beginning of the project. What is likely to change? What will the impact to the
project be? This proactive approach is called Risk Management.
82
Software Engineering Management SEN 941
Monitor Risks - throughout the project life cycle at the weekly team
meeting. Sometimes these risks give off early warning signals that they
are going to occur before they actually do
Risk Mitigation - some identified risks can be prevented before they
occur. Perhaps we have identified a key team member that may be
likely to be reassigned before the project is finished. Putting a partner
with this key member who can step into his role if he’s reassigned
would be a way to mitigate the risk.
Risk Contingency Planning - if you can’t mitigate a risk or prevent it
from occurring, then you must put together a plan for how the team is
to deal with the change when it does occur. Having a plan prepared
ahead of time will prevent fire fighting.
Larger projects inherently have more risk associated with them. More team
members lead to a higher likelihood of communication failures. Longer projects
increase the likelihood that changes will be required. Consequently, Risk
Management is a MUST for larger projects. Project Managers prepare a Risk
Management plan referred to as a Risk Management, Mitigation, and Monitoring
(RMMM) plan that formally identifies the risks and outlines contingency plans.
Risk Management is important for smaller projects too. However, the process is
less formal. The Project Manager goes through all the same steps as outlined
above, but they are more abbreviated and typically are not formally documented.
Predictable Risks
As stated earlier, larger projects bear more of these risks than smaller projects.
However, smaller projects also have these three risks. The Project Manager
must identify and assess the likely communication problems, the stability of team
members, and which requirements are likely to change. Mitigation or contingency
plans must be developed and these risk areas must be monitored throughout the
project.
Identifying Risks
The Project Manager begins to identify risks by looking at the following situations.
83
Software Engineering Management SEN 941
Strategic Risk
Are the project objectives aligned with the overall business objectives?
To what extent is the business structure likely to change/reorganize during
the project lifecycle?
To what extent is senior management committed to the project’s
outcome? If not fully committed, the team may not get the proper support
when they need it the most.
Financial Risk
Technology Risk
84
Software Engineering Management SEN 941
Risk Prioritization
Once the Project Manager has identified all the possible risks, assessed their
likelihood of occurring, and assessed the impact to the project if they do occur,
then the risks should be prioritized. Those that are most likely to occur and have
the highest impact to the project should be of highest priority. The top priority
risks (perhaps 10) will either be mitigated or contingency plans prepared. These
top 10 risks are the ones the PM will monitor most closely for the duration of the
project. It is not practical to develop contingency plans and mitigation strategies
for every risk to a project, but all risks should be monitored occasionally.
The Pareto rule (sometimes called the 80-20 rule) can be applied here. This says
that 80% of the causes of project failure can be traced to 20% of the risk factors.
Hopefully, our list represents that 20%.
The RMMM plan outlines and reports these findings. Though this report is largely
in textual format, the Air Force has developed a visual risk grid (Pressman, page
150) that shows the risks along the Y-axis and the project impact for each risk
along the X-axis. This is a good supplement to be included in the RMMM report
and for the PM to use as a guide for monitoring.
The following example addresses more specifically the steps that should be
followed to create a Risk Management plan. Let’s look at the steps involved:
Brainstorming sessions involving all of the personnel on the project are often
conducted to identify candidate risks. We can also look at past history to see
what risks have been considered in the past and what problems have occurred.
For this activity, let’s consider the idea of going for a day in the Sonora Desert
outside Tucson. Before starting out it might be a good idea to consider what risks
we are taking and what we could do about them. What risks do you think would
be involved?
One risk could be that ‘We might run out of water.’ However, while this simple
statement identifies an area of risk it is not stated in such a way as to make the
actual risk clear. It doesn’t pass the ‘So what?" test. That is, what will happen if
we run out of water? A better statement would be ‘We might run out of water and
suffer extreme dehydration.’ This statement identifies both what happens and
what the consequence might be. One of the most common mistakes made in risk
assessments is failing to define the risk statement adequately.
85
Software Engineering Management SEN 941
A complete risk statement that passes the ‘So What?’ test is easier to assess in
terms of its probability and impact. It also makes it possible to develop focused
mitigation strategies and contingency plans.
Risk identification is not complete until you have carefully considered all of the
possible risks to your project.
While it might be nice to formally manage all of our risks, this takes time and
money. So, our next step is to determine which risks are significant enough that
they need to be formally managed. In this step we will assign a number from 1 to
9 to each risk to indicate how likely it is to happen and how significant the impact
would be if it does happen. The higher number indicates a higher probability and
greater impact. Then you multiply the two numbers to calculate a risk index and
identify those risks that will be formally managed.
How likely is it that we will run out of water? It depends on how long the hike is,
how hot it is, and how much water we carry. Making an accurate judgment about
this likelihood is easier if we have prior experience hiking in the desert.
Experience is a critical factor in all risk assessment. You should always involve
people who are experienced in the process to help you assess probability and
impact.
For our purposes we are going to say that it is moderately likely that we will run
out of water. Therefore we will give this a 5. What is the impact? Again,
experience is helpful, but I think we would all agree that the impact of this is
pretty high. Let’s give it a 9.
By calculating the risk index for each risk we can identify those risks that need to
be managed further. All risks above a specified risk index value (we will use 28, a
common value in practice) are formally managed.
86
Software Engineering Management SEN 941
Step 3: Develop Mitigation Strategies and Contingency plans for each risk above
the specified risk index value.
Each risk that exceeds our specified risk index value (over 28 in our case) will be
formally managed. This means that we will develop a mitigation strategy and
contingency plan. The mitigation strategy addresses how we will reduce the
probability that the risk will actually occur. What could be done to reduce the
probability of running out of water? We could carry more water than we think we
will need. We could also research the locations of fresh water supplies near our
trail.
The contingency plan addresses what we do if, despite our attempts to mitigate
the risk, it still occurs. What happens if we start to run out of water? We could
begin rationing immediately. We could also head for the nearest fresh water
supply. Finally, we could use our cell phone to call for help.
But wait a minute, we might not have a cell phone with us - at least not if we
didn’t consider that as one of our mitigation strategies. This goes to the very
purpose of risk assessments - thinking about what might go wrong so we can
reduce the probability that it will happen, and be ready to react if it does. Let’s
add carry a cell phone to our mitigation strategies.
Once you have captured all of this information you need to document it in a
readable format. The following is a sample Risk Assessment for our desert hike.
Note: Normally, you would have more than one Mitigation and Contingency for
each risk. This is a simplified example.
87
Software Engineering Management SEN 941
If a risk does not exceed our threshold risk index, we do not develop mitigation
strategies and contingency plans. However, we do continue to monitor those
risks, along with our other risks. By reassessing the probability and impact of
risks as the project progresses we ensure that we aren’t caught by surprise and
become a ‘reactive’ risk manager.
88
Software Engineering Management SEN 941
89
Software Engineering Management SEN 941
Section Seven
Objectives:
• Java Programming
• GUI and Prototype Design
Assignments/Activities:
• No deliverables
• Java Programming Lab
90
Software Engineering Management SEN 941
91
Software Engineering Management SEN 941
Section Eight
Objectives:
• Software Metrics
• Quality Assurance
• Configuration Management
Assignments/Activities:
• No deliverables
• Java Programming Lab
Metric programs sprang up everywhere during the 1980s with the popularity of
the Total Quality Management (TQM) movement. These metrics programs
promised if software development activities could measure variations, properly
interpret those results, and adjust processes accordingly, the resulting software
product quality would significantly increase. Everyone was interested in these
kinds of results and invested heavily in sending software professionals to metric
training classes and purchasing metric collection tools. However, the
management teams driving these programs were not committed to the long-term
investments necessary in the collection and analysis of data over periods of time
nor did they have the proper training or experience to interpret the resulting data
to take the appropriate corrective actions. Consequently, most metric programs
during the 1980s resulted in large investments wasted on failed metric programs.
92
Software Engineering Management SEN 941
There has been debate in the industry over the cost/benefit of moving past CMM
Level 3. There is no argument that implementing basic PM, CM, QA, and
Requirements Management practices yield significant quality benefits. However,
there is speculation that achieving CMM Level 3 produces somewhere near an
80% product quality improvement. The additional investment required moving to
Level 4 and Level 5 may only yield an additional 20% product quality
improvement. There is some doubt whether the 20% quality improvement is
worth the investment. Establishing workable, sustainable metric programs that
yield continuous process improvements is VERY expensive.
Process Metrics
Process metrics are strategic. These measurements tell the management team
whether they are meeting their overall business goals. To determine these
objectives metrics are collected across several projects. Investments and
commitments must be made for long-term metrics collection to amass enough
historical data over time to identify and analyze trends. Those organizations that
are mature enough to make these commitments are reaping the benefits.
Project Metrics
Project metrics are tactical. These measurements tell the Project Manager and
management team whether the project they are managing is on track. Is it
producing deliverables on time and within budget? These metrics have
immediate as well as long-term benefits. Most organizations gather project
metrics during project execution for this very reason. However, few have
methods of collecting this data over long periods to further analyze trends to be
beneficial to overall process improvement.
The most common metrics used for size estimation is the Line of Code (LOC). A
LOC is simply that. One line of code is counted as one; the next LOC is counted
as two, and so forth. However, controversy on what constitutes an LOC abounds.
Should a comment line in a computer program be counted as a LOC? Some
argue yes. It takes effort (therefore cost) to produce it and maintain it. The
comment line represents an asset just as a line of executable code does. Others
argue no. Whatever method is used to count LOC is not as important as
consistency. Determine what to count and consistently count it for the entire
inventory.
93
Software Engineering Management SEN 941
LOC metrics does us some relative size factor when determining effort required
to maintain it or in estimating future projects of similar size. However, LOC is
language specific. 1000 lines of COBOL code will take much less effort to
maintain that 1000 lines of C code. Further, by assigning value to software based
on its size in LOC, we are effectively rewarding inefficient software development.
Also, accurate LOC counts are not available until late in the development life
cycle, long after key decision based on size need to be made.
Function Points
The Function Point (FP) is also considered a sizing metric. It yields language
independent data, and provides information on the relative complexity of the
program being evaluated. The program is evaluated using scales that determine
relative complexity values for such processing events as: I/O required, inquiries,
numbers of external interfaces, use of graphical user interfaces, and other
criteria. The program is assessed, the values are applied, and a resulting FP for
the program generated. Consequently, in our example above - 1000 lines of
COBOL code may yield a FP value of 10, whereas the 1000 lines of C code may
yield a FP value of 100. This data is more relevant in predicting maintenance
levels and estimating future projects.
FP estimates are more easily estimated during analysis and design phases.
Software engineers can estimate the relative FP of the resulting product early in
the lifecycle using analysis and design models. This data is immensely useful in
estimating further development efforts.
There are automated tools that will scan source code inventories and count LOC.
However, the tools available for scanning source code to produce FP have not
become very popular. The process for deriving FP by manually scanning source
code has not been an investment that many developers have been willing to
make. For these reasons, LOC continues to be the more widely used size metric
for legacy inventories.
Function Point counts are driven primarily by the number of Inputs, Outputs,
Inquiries, External Interfaces, and Files for the target system. These counts are
assigned a weighting factor and the final count is adjusted for complexity. The
94
Software Engineering Management SEN 941
In this activity we will calculate the function points for a sample system. To do
this we will reference a context level Data Flow Diagram and an Entity
Relationship Diagram for that system.
Below are the context level DFD and ERD for an imaginary airline company.
They have, of course, been simplified for use in this exercise.
Any arrow pointing towards the process bubble in the center of the DFD is an
input. Any arrow flowing away from the process is an output. Pretty simple.
However, for purposes of counting Function Points some of these inputs and
95
Software Engineering Management SEN 941
outputs are counted as inquiries and external interfaces. These must not be
double counted.
Inquiries
The ‘Arrival Time Inquiry’ from the Customer is simply a request to retrieve the
time that a flight will arrive from the system. This inquiry and the associated
‘Inquiry Response’ arrow are counted as one inquiry for Function Point purposes.
So that we don’t double count them we will ignore these same two arrows later
when we count inputs and outputs. Inquiries are counted separately because
they are generally simpler to implement than other inputs and outputs and the
Function Point counting process has been structured to reflect this.
External Interfaces
External Interfaces are more difficult to implement than other inputs and outputs
so they need to be counted separately as well. ‘Incident Report’ going to the FAA
is an external interface because the data is flowing between our system and
another automated system, rather than to a human being. The airline system
must send electronic transactions to the FAA, something much more difficult to
implement than using a screen interface.
In contrast, the Reservation uses a GUI interface screen, which we control. While
it is true that this is an interface with something ‘external’ to our system, it is not
what we mean by the term ‘external interface’ when counting function points.
Again, you would only be able to make these distinctions if you had more
detailed knowledge of the actual requirements. When Function Points are
counted for real world systems the counter must be familiar enough with the
requirements to make this sort of distinction. When you do the function point
count for your team project you can make your own assumptions based on your
knowledge of that requirement. In any case, we will count Incident Report as an
external interface and not as an output. Incident Report is the only external
interface on our diagram.
The remaining arrows (including the aforementioned ‘reservation’) are all either
inputs (if flowing into the process bubble) or outputs (if flowing out). This leaves
us with a count of 3 inputs (Time Card, New Flight Request and Reservation), 2
outputs (Pay Check and Monthly Report), one Inquiry and one External Interface.
This count is one less than the number of arrows on the diagram because the
two arrows associated with the inquiry count as only one.
96
Software Engineering Management SEN 941
Files
All we have left to count are the files. For our purposes we will simply use the
number of entities on our ERD. As you can see, there are 4. While the counts
above will work for this course, the actual process is much more complex. In the
real world trained certified Function Point counters are often called upon to
perform the counting while working with experts in the functionality of the
process.
Our next step is to plug these counts into the table on the top of page 90 in
Pressman. To use this table we must decide if each of our counts is simple,
average, or complex. Let’s assume that everything is average except for the Pay
Check, which we will treat as complex, and the Aircraft file, which we will treat as
simple. Do the math and determine your own count before proceeding.
Total = 8 + 17 + 4 + 37 + 7 = 72
The final step in our process is to adjust this count based on the overall
complexity of our target system. If we are implementing the system in a very
simple environment we should adjust the count down. If the environment is
particularly complex, we should adjust upwards. To make this adjustment we
must answer the 14 questions listed at the top of page 91. Again, knowledge of
the target application is essential to do this properly.
Let’s look at a couple of these questions. Number 1 asks; ‘Does the system
require reliable backup and recovery?’ Well of course it does. Every system
does. But we need to answer with a numeric value from 0 to 5, where 0 is not
important and 5 is absolutely essential. If this were a banking application we
would probably give it a 5 - we certainly don’t want to lose records of our
customer withdrawals. If the system simply calculated handicaps for our local
bowling league we might rate this a 1 or 2. What would it be for an airline
system?
97
Software Engineering Management SEN 941
Continue this process for each of the 14 questions. Make whatever assumptions
you feel are appropriate for an airline system. For our purposes, let’s assume
that the rest of our answers are all 4s. If we add the values of all of the 14
answers it would give us a sum of 56 (4*14). Therefore, our complexity
adjustment value is 56.
To complete our calculation we plug the complexity adjustment value (S (Fi)) and
the base function point count (count total) into the formula:
This number identifies the size of the project in Function Points. It provides a
means of comparing various projects and of making size and budget estimates
based on past history. While it is not an exact process, it has proven to be more
meaningful than any other common method for estimating project size.
Quality Metrics
Quality - though some may argue that quality is in the eye of the customer,
quality measurements are usually gathered in terms of numbers of errors
produced during the software development process or numbers of defects
reported by the customer after product delivery. Finding errors is good - we want
to find as many errors as possible in the product before it is delivered to the
customer. A good software tester will find many errors. A poor software tester will
find few. Finding defects is bad - these are errors that we failed to find during the
software development process and were delivered to the customer in the final
product delivery.
We will discuss ways in which we can find errors in the software artifacts early in
the software development process even before the code is produced later in this
module. Suffice it to say at this point in time that the errors should be
documented, tracked, and analyzed at the end of the production cycle to
determine root causes and ways to improve the process so as not to produce the
errors in the first place. A useful metric is Defect Removal Efficiency - number of
errors found before delivery compared to defects found after delivery - DRE = E/
(E+D).
98
Software Engineering Management SEN 941
There are quality measures that the software engineer may consider that are not
specified by the customer, but rather are deemed necessary in constructing a
sound product.
Examples of such quality factors are:
Effort Metrics
Effort measurements will tell us how long it took to develop a product and the
relative resource costs. Effort is measured by the project schedule. At the
beginning of the project, the project schedule is established with the original
estimates of each task and duration. During the project’s execution, the project
manager will track the actual duration of each task. The resulting estimates and
actual results will be evaluated at the conclusion of the project and assessed for
process improvement. This data, if captured in a repository can be evaluated
collectively with other projects to form trend analysis.
In the end, the skill and motivation of people has been shown to be the single
most influential factor in quality and performance.
99
Software Engineering Management SEN 941
Quality assurance tries to respond to the questions of what is quality and how will
we know when we have it? Quality Control (QC) is an SQA activity that refers to
the act of inspecting, reviewing, and testing. It is a general misconception that
QC is synonymous with SQA. SQA refers to the strategic planning and
management of ALL quality activities of which QC is one function.
Quality Management
The problem of quality management is not what people don’t know about it. The
problem is what they think they do know. The prevalent attitude in the software
industry assumes that everyone already knows how to build quality software;
therefore, no formal programs are required. This attitude could not be further
from reality. Building quality software is not a talent one is born with; it is a
learned skill and requires sound management practices to ensure delivery.
Quality does not mean the same thing to all people. It is important that each
software development organization form a common definition of software quality
practices for their group. Will the customer tolerate a certain defect level? As
customers of software, we all have. You can purchase any piece of software off
the shelf and you will find defects in the product. Not a single Microsoft product
has been released without defects as it is rushed to market in an effort to beat
competitors. We make our purchase and wait for the next release to fix the errors
and introduce new functionality with new defects. These defects can range from
merely annoying to life threatening. Consider, for example, the consequences of
defects in aerospace software or in software that supports surgical procedures.
Defects can cost billions of dollars if they are in financial software. How much
quality testing is enough? One must further ask, how much would an error cost
the customer? Testing practices should be as rigorous as the financial impact of
the defect.
If we are producing a piece of desktop software for sale on the market at a retail
price of $29.99, and an error would not be more than an irritant to the customer,
it would not be cost effective to spend the time and money to ensure that the
product was completely error free.
100
Software Engineering Management SEN 941
reserved for the later part of the project, it typically is cut short to deliver the
product on time. Consequently, defects are delivered to the customer.
During the 1940’s the U.S. was heavily entrenched in product manufacturing.
Little importing or exporting occurred at this time. Therefore, the manufacturing
firms had a captive and eager U.S. marketplace in which to sell its products.
These products were not of the highest quality. Regardless, the manufacturer
could not make the goods fast enough. Demand exceeded supply.
During this time, Japan was rebuilding after WWII and was very interested in
competing in the world market. Dr. Deming took his quality message to Japan
where it was well received. They implemented his programs and were able to
produce higher quality products. The U.S. began to ease import restrictions and
during the 60’s and 70’s these higher quality products appeared in the U.S.
marketplace. The U.S. manufacturers quickly lost market share to the Japanese.
When Dr. Deming returned to the U.S. in the 1970’s to deliver his quality
improvement message, the U.S. manufacturers were ready to listen. During the
1980’s these programs were known as Total Quality Management (TQM).
However, the U.S. wanted a quick fix and did not fully comprehend the paradigm
shift necessary to implement TQM. Many manufacturers invested large budgets
in training programs, but failed to commit to real change. Even today, products
bearing the name of SONY, Mitsubitsi, Fuji, Toyota, and Honda represent quality
in the U.S. marketplace.
101
Software Engineering Management SEN 941
Deming’s TQM methods to establish the Capability Maturity Model (CMM). The
CMM is the foundation for establishing sound, continuous, quality-improvement
models for software development.
Quality Programs
Many major U.S. software development firms (IBM, TRW, Bell Labs, etc.) are
serious about software quality and have implemented permanent quality
programs. Other companies have yet to begin to determine what software quality
is or whether it merits time and money investments for their business.
The CMM is more widely practiced and accepted in the U.S., the international
standard for software quality is known as ISO 9001. The CMM and ISO both
provide criteria for assessment certification and their standards are almost
identical. An important distinction between the two is that the Software
Engineering Institute provides certification at various levels (1-5), while ISO
provides certification only when all standards are met. ISO 9001 provides 20
requirements for the Software Engineering industry in the areas of:
Management,
Quality systems,
Contract review,
Design control,
Document and data control,
Product identification and trace ability,
Process control,
Inspection and testing,
Corrective and preventive action,
Internal quality audits, and
Training.
1. Define what software quality means (in specific terms) for your
organization or team.
2. Identify a set of activities that will filter errors out of the work
products before they are passed on to the next activity.
3. Perform these activities.
4. Use audits and reviews to ensure these activities are being
performed.
102
Software Engineering Management SEN 941
The first law of system engineering is that "No matter where you are in the
system life cycle, the system will change, and the desire to change it will persist
throughout the lifecycle." Change is inevitable.
103
Software Engineering Management SEN 941
Once an artifact has undergone formal technical review and is ready to pass onto
the next development phase, it is "base-lined" and placed in the CM repository.
This product will be referred to as version 1.0. Once the artifact is base-lined, it
must go through a formal change process to be modified.
This process is referred to as Version Control. Version Control enables the team
to trace changes and provide an audit trail later in the product lifecycle. The
Project Plan is usually one of the first artifacts to be base-lined. The original
estimates and scope for the project are preserved. As the project scope expands
and estimates are adjusted, incremental versions of the plan are generated.
Likewise, as analysis models are reviewed and base-lined and requirement
changes are introduced during the coding phase, new versions of the models are
generated to reflect the changes preserving the older versions for trace ability. It
is not uncommon that changes that were made are inadvertently removed and
the older version is restored.
Many companies maintain multiple versions of their software. Version 1.0 may be
installed at one customer site while other customers are implementing the latest
release version 2.0. It is very important that the company keep track of which
versions of which artifacts go with which software product releases.
Some companies will also manage the software tool sets used to produce their
software products as configuration items. For instance, which version of the tool
used to produce the analysis and design models was used for which versions? It
is very important to capture information such as the use of a specific tool to
produce a product. If we used version 3.3 of the modeling tool to produce
analysis model version 1.0 through 3.0 and then upgraded the modeling tool to
version 3.4 to produce analysis models version 4.0 and higher, we might have a
problem. Analysis models 1.0 through 3.0 might not be readable by the newer
version of the modeling tool.
It is the job of the SQA team to make sure that everyone on the project
understands which artifacts are to come under CM, which tools are being used,
and that everyone receives training in the proper use of those tools. The SQA
team will conduct audits during the development process to ensure that
procedures are being followed.
104
Software Engineering Management SEN 941
105
Software Engineering Management SEN 941
Section Nine
Objectives:
• Software Maintenance
• Debugging and Testing
Assignments/Activities:
Out of all of the phases in a life cycle, maintenance is the most costly in relation
to the other phases. Data gathered in the late 1970s and early 1980s by Boehm
and others showed that maintenance costs represent 67% of total life cycle
costs. Maintenance is not only the most costly part of a project; it is usually the
longest phase in a project. Although the length of the maintenance phase is out
of our control, we can manage the costs associated with this phase.
Maintenance costs can be reduced by several techniques such as creating an
appropriate level of documentation of sufficient quality, and by writing quality
code.
106
Software Engineering Management SEN 941
Most programmers begin testing by making sure the program performs correctly.
Checking to make sure a program performs correctly is not the same thing as
checking the reliability of a program. Reliability is concerned with the program
performing under all uses. For example, is the program able to add two real
numbers? What happens if the user types erroneous data such as alpha
characters for the first input value? Does the program blow up or print out an
error message? A program that works correctly and does not blow up is not
necessarily a program that does what it's supposed to do. Tracing requirements
to the test process ensures that the product meets the expectations of the client
and user community. An integral part of testing is making sure that requirements
have been met.
Depending on the size of your organization and the degrees of formality in your
software development life cycle, testing can be the responsibility of the
programmer, a Quality Assurance (QA) team or an Independent Verification and
Validation team. No matter what's in place at your organization, testing begins
with the programmer.
Unit testing is what a programmer does to ensure that everything they coded is
correct. This type of testing begins when the programmer has decided that they
are done coding and debugging. In a formal environment, the programmer is
expected to document unit tests by recording test cases. A test case consists of
input, expected output and the results of the specific test case. It is also common
for the programmer to map requirements to the test cases. This mapping ensures
that the product does what its required to do by the client or designers. Once the
programmer is finished testing the product is ready for alpha and/or beta testing.
Whether you conduct alpha and/or beta testing is really dependent on the size of
the product and the size of the user community. For example, the QA
organization at USPS uses both alpha and beta testing techniques. After
successful completion of unit testing the product is ready for an "alpha" test.
Alpha testing consists of releasing the product to one or two key users. This
initial release provides testers with additional feedback on the product and it also
provides a level of user testing that is difficult to duplicate in-house. Users always
seem to use a product in manner in which the developers did not intend. At the
conclusion of alpha testing the tests are expanded to a greater number of sites or
107
Software Engineering Management SEN 941
users during beta testing. This last set of tests is designed to ensure that the
product is reliable and does meet the needs of the user community by performing
in a real-world environment.
Independent Testing
Personnel who are not part of the project team perform Independent Testing.
That is, they are not accountable for delivering the product on time or within
budget. Independent testing is important because the project team may
unwittingly compromise testing in order to meet budget and schedule pressures.
An Independent Testing Team is not accountable for meeting the project dates
and can focus solely on the quality of the product without this conflict of interest.
Independent Testers normally report to senior management or to the customer,
never to the Project Manager.
Debugging
Regression Testing
Testing Types
108
Software Engineering Management SEN 941
Unit Testing
Unit Testing refers to the testing of individual modules to ensure that they
operate correctly independently of other modules. This is the first level of testing
and is normally accomplished by the developer. Unit Testing is White Box testing
techniques.
Integration Testing
Integration Testing ensures that all modules interoperate properly and can be
integrated successfully into a functioning system. The development team
performs integration testing once Unit Testing is complete and prior to Validation
Testing.
Validation Testing
Validation Testing is Black Box testing that ensures the customers requirement is
met. The end user or representatives of the end user normally perform Validation
Testing. Validation Testing is the most important testing phase from the
perspective of user acceptance of the system.
System Testing
System Testing follows Validation Testing and ensures that the software will
operate properly within the overall target environment, including other existing
systems.
Acceptance Testing
Beta Testing
An end user of a finished product performs Beta Testing in the end user’s
environment. The end user is commonly given unrestricted use of the software in
exchange for providing information about software defects. Beta Testing is
commonly used for software that operates on a workstation; it is provided to
users who are likely to apply the software in a variety of ways. This approach is
helpful when it is difficult to completely test software using formal test cases and
predicted results.
109
Software Engineering Management SEN 941
Performance Test
Stress Test
Security Test
Implementation Test
Parallel Test
During a Parallel Test the new software is executed in parallel with existing
software. This provides a baseline for comparison of products of the new system
to ensure that they are the same as in the old (or that any differences can be
explained in terms of new requirements). It also provides a fall back system in
the event the new software is proven to be inadequate.
Initial Operational Testing may occur for a specified period after the software is
put into production. This is not testing in the strictest sense, but rather implies
that a formal predefined scrutiny will be applied to all products from the software
until verification that the software is functioning properly is obtained.
110
Software Engineering Management SEN 941
Environmental Test
Recovery Test
A Recovery Test is executed to test the recovery procedures for the software.
When the software fails the specified recovery procedures are executed to
ensure that they achieve the appropriate result. Recovery Testing is often
accompanied by efforts to force the software to fail.
111
Software Engineering Management SEN 941
Section Ten
Objectives:
Assignments/Activities:
• Final Exam
• Prototypes Due
• Peer Evaluations
112
Software Engineering Management SEN 941
113