CS150 - Unit 3 - Problem Analysis and Development of Programs
CS150 - Unit 3 - Problem Analysis and Development of Programs
Introduction to
Programming Fundamentals
Unit 3
Problem Analysis and Development Of Programs
1
Objectives
• Outline the stages of program development
• Explain the outcome of each stage in program
development and it’s importance in the
development life cycle
2
Analysis
• understand and specify the exact requirements of the
program to be developed and built
• define what the program is to do
• can involve interviews with the system designer and with
the future users of the programs so that a clearer
understanding of the requirements is communicated
• Example
• Purpose To calculate the user’s gross pay.
• Output Display a message indicating the user’s gross pay.
• Input Number of hours worked, hourly pay rate.
• Process Multiply number of hours worked by hourly pay
rate. The result is the user’s gross pay.
3
Design
• This stage determines an algorithm to implement the
Input/Processing/Output process
• First define the structure of the overall program and the relationship
between the modules and represent them in a structure chart (e.g top
down decomposition)
• Simple programs may only have one module
• next define the purpose and method of operation of each module as
an algorithm.
• An algorithm is a description of a procedure or set of instructions required
to perform a specific task, and contains descriptions of the data to be used
• Use flowcharts, pseudocode or Nassi-Schneidermann diagrams
• The last part of the designs stage is checking the logic of the
algorithms.
• This is checked using specially designed test data and a process of stepping
through the alogrithm called desk-checking
4
Development / coding
• The development stage consists of two components:
• coding and debugging
• done in an iterative manner
• Syntax errors, which are often spelling mistakes
• Logic errors, which give wrong results
• same test data that was used in the design stage desk-
checking is used to check the logic as the results are already
known
5
Testing
• checked against the program specifications from
the analysis phase
• Can be done by an developers and users
6
Implementation / installation
• The implementation stage involves the installation
of the program in the environment where it will
be tested against live data with trained users.
• This type of testing is often more thorough than
specially designed test data.
• The implementation may only involve a small
number of the end-users to begin with and then
extend to all the staff and branches
7
Evaluation
• The program is usually evaluated some time after
it has been fully implemented within the
organisation
8
Maintenance
• Longest state in the entire cycle
• Correct errors
• Add enhancements
• Fix errors
• Modify or expand the program
• Corrective maintenance, Adaptive maintenance,
Perfective maintenance and preventive maintenance
9
Exercise
• Why should you conduct analysis and design before
we write a computer program?
• What can happen if we try to write a program
before we go through the stages of analysis and
design?
• Explain in your own words each of the stages
involved in program development. In your answer
explain the importance of each stage and what it
produces
10