Академический Документы
Профессиональный Документы
Культура Документы
SOFTWARE
DEVELOPMENT
METHOD
Objectives
In this chapter you will learn:
The electronic computers and its’
suitable programming language
To solve problem using problem-solving
strategies and methods
The algorithm as a guidance in
designing program
1
Subtopics
Electronic Computers
Introduction to Programming
Software Development Method
(SDM)
Algorithm Design
Electronic Computers
What is computer ?
A computer is an electronic device
designed to perform operations specified
with a set of instructions called a program.
A computer include both hardware &
software
2
Why we need computers ?
The use of Computer in daily activities
bill payment, booking transportation ticket,
communication services, e-mailing friends, on-line
communication, subject registration, course
assessments & etc.
3
Computer Hardware (2)
HARDWARE = PERIPHERAL EQUIPMENT + CENTRAL/SYSTEM UNIT
Computer Software
Operating System (OS)
Unix, Window, Linux
4
Intro to Programming
Programming is the core of everything to do with
computers, computing, networked systems,
management information systems, multimedia and
so on (all computer-based things)
5
SDM Phases
provides us with a precise definition of the
problem.
6
Logic/Design errors
Syntax Errors
o Syntax errors are violations of syntax rules, which
define how the elements of a programming
language must be written.
o They occur during the implementation phase
and are detected by the compiler during the
compilation process. In fact, another name for
syntax errors is compilation errors.
o If your program contains violations of syntax rules,
the compiler issues diagnostic messages.
o Depending on how serious the violation is, the
diagnostic message may be a warning message
or an error message.
7
Runtime Errors
8
SDM : Documentation & Maintenance
For every problem solving, there are 5 things to be
documented :
Program description
Algorithm development and changes
Well-commented program listing
Sample test run
User’s manual
Algorithm Design
An algorithm is a sequence of a finite
number of steps arranged in a specific
logical order that, when executed,
produces the solution for a problem.
9
Analogy
Pseudocoding
Short English phrases with a limited
vocabulary are use to describe the
algorithm (the processing steps). A
pseudocode must :
10
Example of Pseudocode
Flowcharting
11
Flowchart Symbols (1)
Symbol Name Of Symbol Description And
Example
Indicates the
Terminal beginning or end of
an algorithm
Indicates an Input
Input/Output or Output operation
Indicates
Process computation or data
manipulation
Indicates a decision
Decision point in the
algorithm
12
Example of Flowchart
Sequence Structure
o a series of steps or statements that are
executed in order (ex : as shown in Problem 1)
Selection Structure
o Define two courses of action depending on
the outcome condition ( true or false)
Repetition control structures
oSpecifies a block of one or more statements
that are repeatedly executed until a condition
is satisfied.
13
Sequence Structure
begin
Statement_1 Statement_1
Statement_2
Statement_2
…
Statement_n
end Statement_n
Selection Structure
if condition
condition yes then_part
then_part
else no
else_part
else_part
end_if
14
Repetition Structure
while condition
loop-body
condition Yes Loop_body
end_while
No
Problem :
The C programming test scores can
be classified into two condition, PASS
and FAIL. The student is require to
input their marks in positive integer . If
the score is greater than or equal 50
message Pass will appear, message
Fail otherwise
15
Applying the SDM : Phase 1 & 2
Phase 1 : Requirement Specification
Selection Structure
test scores, message ‘PASS’, message ‘FAIL’, greater or
equal to 50, less than 50
Phase 2 :
Data requirements :
Input : test_score
Output : ‘PASS’ or ‘FAIL’
Relevant formula : None
Constrain : the test score must greater than 0
(zero)
Condition : test_score >= 50
test_score < 50
16
Applying the SDM : Phase 3 (2)
Flowchart
Exercises
1. Write an algorithm that calculate
the multiplication of two integer
numbers.
2. Write an algorithm which can
determine the positive and
negative integer.
3. Write an algorithm that can print
series of odd numbers between 0
and 12.
17