Bab 1. Software Engineering
Bab 1. Software Engineering
BY
Riya Widayanti, S.Kom,
MMSI
1
BAB 1.
Software Engineering
Principles
Software design Process
- Goals of Quality Software
- Specification: Understanding
the Problem
- Writing detailed specifications
- Program Design
2
Goals
To be able to describe the general
activities in software life cycle
To be able to describe the goals for
“quality” software
To be able to explain the following
term: software requirements, software
specifications, algorithm, information
hiding, abstraction
To be able to understand several
source of program errors
To be able describe strategies to
prevent various categories of software
errors
To be able to specify the preconditions
and postconditions of program a
program segment or function
3
Goals
To be able to show how desk
checking, code walk-throughs, and
design and code inspections can
improve software quality and reduce
software effort
To be able to state several testing
goals and to indicate when each would
be appropriate
To be able to describe several
integration-testing strategies and to
indicate when each would be
appropriate
To be able to explain how program
verifications techniques can be applied
throughout the software development
process
4
Software Design
Process
The activities in the software “life
cycle”:
Problem analysis: understanding the nature
of the problem to be solved
Requirement definition: Specifying exactly
what the program must do
High and low level design: Recording how the
program meets the requirements, from the
“big picture” overview to the detailed design
Implementation of the design: Coding a
program in a computer language
Testing and verification: detecting and fixing
errors and demonstrating the correctness of
the program
Delivery: Turning over the tested program to
the customer or user(or instructor)
Operation: actually using the program
Maintenance:making changes to fix
operational errors and to add or modify
functions of the program
5
Software Engineering
A disciplined approach to the design,
production, and maintenance of computer
programs that are developed on time and
within cost estimates, using tools that help to
manage the size and complexity of the
resulting software products.
6
Goals of Quality Software
It works
It can be read and understood
It can be modified without excruciating time
and effort
It is completed on time and within budget
7
Quality Software can Be Read and
Understood
8
Specification:
Understanding the Problem
On the third day of class you are given a 12
description of Programming Assignment 1,
which must be running perfectly and turned in
by noon, a week from yesterday.
The responses listed here are typical of those given
by class of computer science student in such
a situation:
1. Panic (39 %)
2. Sit down at the computer and begin typing (
30 %)
3. Drop the course(27 %)
4. Stop and thing (4 %)
9
Writing Detailed Specifications
A Formal definition of the problem your program
must solve, which tell you exactly what the
program should do.
In addition, the process writing the
specifications brings to light any holes in the
requirement.
For Example, is a scenario that a designer might
consider when developing the software for a
bank’s automated teller machine(ATM)
10
Program Design
The detailed specification of the program tells
what the program do, but not how it does it.
Abstraction: A model of complex system that
includes only the details essential to
perspective of the viewer of the system.
Object-Oriented Design
This methodology originated with development
of programs to simulate physical objects and
processes in the real world.
Object Class(class): The description of a group
of objects with similar properties and behaviors;
pattern for creating individual objects.
Illustrates some of the object classes that
participate in baking a cake.
Class Attributes Responsibilities
(Operations)
Oven Energy Source Turn On/Off
Size Set Desired
Temperature temperature
Number Racks
12
Bowl Capacity Add to
Current Amount
Egg Size Crack
Separate (white from
yolk)
13
Verification of
software Correctness
How do you know when your program meets
that goals? The simple answer is, test it.
Testing: The process if executing a program
with data sets designed to discover errors
Debugging: The process of removing known
errors
Program Verification: The Process of
determining the degree to which a software
product fulfills its specifications
Program Validation: The process of
determining the degree to which software
fulfills its intended purpose
Acceptance Test: The process of testing the
system in its real environment with real data.
Regression Testing: RE-execution of program
test after modifications have been made in
order to ensure that the program still works
correctly.
14
Robustness: The ability of a program to
recover following an error; the ability of a
program t continue to operate within its
environment.
Assertion: A logical proposition that can be
true or false
Preconditions: Assertions that must be true
entry into an operation or function for the post
conditions to be guaranteed
Post conditions: Assertions that state what
results are to be expected at the exit of an
operation or function, assuming that the
preconditions are true
Deskchecking: Tracing an execution of a
design or program on paper.
Walk-through: A verification method in which a
team performs a manual simulation of the
program or design.
Inspection: A verification method in which one
member of team reads the program or design
line and the other point out errors.
15
Unit testing: Testing a module or function by
itself.
Functional Domain; The set of valid input data
for a program or function
Black Box Testing: Testing a program or
function based on the possible input values,
treating the code as a “black box”.
Clear (white) box Testing: Testing a program
or function based on covering all of the
branches or paths of the code.
Branch: A code segment that is not always
executed; for example, a switch statement has
as many branches as there case labels
Path: A combination of branches that might be
traversed when a program or function is
executed.
Path Testing: A testing technique whereby the
tester tries to execute all possible paths in a
program or function.
Test plan: A document showing the test cases
planned for a program or module, their
purpose, inputs, expected outputs, and criteria
for success.
16