Algorithm Design and problem solving
Sunday, March 26, 2023 11:04 AM
System development life cycle
The stages that must be completed when developing a computer system
1 analysis
2 design
3 coding
4 testing
Requirements Specification
The document created at the end of the
Analysis : analysis stage
- The problem is identified includes the input , output and processing
- The present system is investigated to understand how it works requirements of the new system
- The terms of reference (requirement specification) is created , giving details of
what the new computer system should do and both parties (client, software
company) agree
Abstraction : during investigation a large amount of information may be
Structure Chart: A tool used to break a problem int
gathered. Abstraction is removing the data that is not important to creating a
smaller parts
solution to the problem
Example : problem : Route planning : computer system that finds the shortest
routes the delivery truck must take .
Data : Map giving roads, railway lines and bus routes
During abstraction : railway lines and bus routes removed
Decomposition : Breaking a problem into smaller parts so that each part of the
problem can be solved separately .
Example : problem calculate and display the average of 1000000 numbers
entered into the computer
This problem can be broken into 3 parts : Entering the Numbers , the
calculation , output of the result
Continue from here !!!!!!!!!!!!!!!!!!
Design : Creating the details of the new system on paper
This includes structure charts , flow charts , pseudo code , input screens, printed
reports
Program specification
- Document produced at the end of the design. Contains details of every aspect
of the system
Coding : writing the program code for the design:
- Different parts of the proggram may be written by different people at the
same time.
- Advantage of modular programing : (writing a number of small programs
rather than one large one)
- Saves time aS different people are writing the parts of the program at the
same time
- Each programmer can work on a part of the problem he is good at
- Small programs are easier to debug
Testing
Purpose : check if the program works as expected
Iterative testing :
- Each module is tested and it errors are detected the code is changed and
retested. This is done until the module works fine
Why is it referred to as a cycle
A computer system needs to be updated to match the changing needs of the
user from time to time . Each time this is done you must repeat the cycle
Top Down Design
Designing a solution to a problem by breaking the system to smaller sub
systems and each of these into even smaller parts until
Each sub system is manageable and a program created for it
- uses decomposition and structure charts
Flow charts