0% found this document useful (0 votes)
4 views

Chapter One

The document outlines problem-solving techniques, emphasizing the importance of understanding problems and developing algorithms to solve them using computers. It introduces the software development lifecycle (SDLC), detailing phases from feasibility studies to maintenance. Additionally, it discusses the use of pseudo code and flowcharts for representing algorithms and the significance of testing and maintenance in software development.

Uploaded by

Haimanot Dubale
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

Chapter One

The document outlines problem-solving techniques, emphasizing the importance of understanding problems and developing algorithms to solve them using computers. It introduces the software development lifecycle (SDLC), detailing phases from feasibility studies to maintenance. Additionally, it discusses the use of pseudo code and flowcharts for representing algorithms and the significance of testing and maintenance in software development.

Uploaded by

Haimanot Dubale
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 25

Chapter One

Problem solving Techniques


What is problem?
A problem is a question or situation that presents uncertainty or
difficulty
Problem Solving
 Problem solving is the process of transforming the description of a
problem into the solution of that problem by using our knowledge of
the problem domain and by relying on our ability to select and use
appropriate problem-solving strategies, techniques, and tools.
 Computer solves varieties of problems that can be expressed in a finite
number of steps leading to defined goal by writing different programs.
 A program is not needed only to solve a problem but also it should be
reliable, (maintainable) portable and efficient
Cont..
Problems can be solved using different techniques as well as different tools.
We will consider those problems that can be solved by using computers as a
tool in this course.
Computers can be programmed to do many complicated tasks at very
high speeds.
Problem solving lifecycle also called software development procedure.
Phase-1: Documentation
Phase-2: Development
The first part focuses on defining the problem and logical procedures to
follow in solving it.
The second introduces the means by which programmers communicate those
procedures to the computer system so that it can be executed.
Cont.…
• Before a program is written, the programmer must clearly understand
what data are to be used, the desired result, and the procedure to be
used to produce the result.
• The procedure, or solution, selected is referred to as an algorithm
An algorithm is defined as a step-by-step sequence of instructions
that must terminate and describe how the data is to be processed to
produce the desired outputs
It is a representation of a solution to a problem.
Cont.…
An algorithm must satisfy some requirements:
Unambiguousness: The algorithm must not be ambiguous. In most
cases we develop an algorithm so that it can be translated into a
program to be executed by computers. Computers cannot cope with
ambiguities.
Therefore, every step in an algorithm must be clear as to what it’s supposed to
do and how many times it’s expected to be executed.
Generality: All possible circumstances are handled.
Correctness: It must be correct and solve the problem for which it is
designed.
Algorithm:
flowcharts and pseudo codes

An algorithm is a finite set of instruction that specify a sequence of


operations to be carried out in order to solve a specific problem or
class of problems.
 All the tasks that can be carried Out by a computer can be stated as
algorithms.
We can write algorithm using pseudo code and flowchart.
Pseudo code

An algorithm can be represented by using a pseudo code or


flowchart. Pseudo code is a compact and informal high-level
description of a program. that can be used to design and
describe algorithms.
 The purpose of using pseudo code is that it may be easier for
humans to read.
Flowchart
 An alternative to pseudo code we can also use flowcharts.
A flowchart is a diagram that uses graphic symbols to depict the
nature and flow of steps in a process.
• The geometrical shapes in a flowchart represent the types of
statements in an algorithm.
• The details of statements are written inside the shapes.
• The flow lines show the order in which the statements of an algorithm
are executed.
Basic Symbols in Flow chart
Cont..
Rules of Flow chart
1. Flow chart is generally drown from top to bottom.
2. All boxes of flowchart must be connected with arrow.
3. All flowchart start with a terminal or process symbol.
4. Decision symbol have 2 exit points, one for YES(TRUE)
and another for NO(FALSE).
Exercise
Q1. write a program that obtains two integer numbers from user then
print out the sum of those numbers.
Q2. Find the average of three integers.
Q3. Write an algorithm description and draw a flowchart to check a
number is negative or not.
Q4. Draw a flowchart to print the large number from two numbers
Loop
• Some times there are conditions in which it is necessary to
execute a group of statements repeatedly. Until some
condition is satisfied. This condition is called a loop
Example
1.Write an algorithm which display a number between 1 and 10
Algorithm in simple English
Step-1: start
Step-2: initialize count=1
Step-3: Is count<= 10
If YES
display count
count=count + 1
then go to step 2
else
Display end of program
Flow chart
Start

Count =1

Is count
End of
<=10 program

YES
Display count

Count =count +1
Cont..
2. Write the algorithm that find the sum of 5 numbers
Hint: Sum= 1+2+3…5
3. Write the algorithmic description and draw a flow chart to find the following
sum.
Sum = 1+2+3+…. + 50
Algorithmic description
1. Initialize sum too and counter to 1
1.1 If the counter is less than or equal to 50
• Add counter to sum
• Increase counter by 1
• Repeat step 1.1
Else
• Exit
2. Write sum
Cont..
System Development Life Cycle (SDLC)

• The Systems Development Life Cycle (SDLC) is a conceptual


model used in project management that describes the stages
involved in a computer system development project from an initial
feasibility study through maintenance of the completed
application
1. Feasibility study
 The first step is to identify a need for the new system. This will include
determining whether a business problem or opportunity exists, conducting a
feasibility study to determine if the proposed solution is cost effective, and
developing a project plan
 A preliminary analysis, determining the nature and scope of the problems to be
solved is carried out. Possible solutions are proposed, describing the cost and
benefits. Finally, a preliminary plan for decision making is produced
The following components
 Organizational Feasibility
 Economic Feasibility
 Technical Feasibility
 Operational Feasibility
2. Requirements analysis

Requirements analysis is the process of analyzing the information


needs of the end users, the organizational environment, and any
system presently being used, developing the functional requirements
of a system that can meet the needs of the users
End users must be involved in this process to ensure that the new
system will function adequately and meets their needs and
expectations
3. Designing solution

 After the requirements have been determined, the necessary


specifications for the hardware, software, people, and data resources,
and the information products that will satisfy the functional
requirements of the proposed system can be determined. The design
will serve as a blueprint for the system and helps detect problems
before these errors or problems are built into the final system
 The created system design, but must reviewed by users to ensure the
design meets users' needs.
4. Testing designed solution

 A smaller test system is sometimes a good idea in order to get a


“proof-of-concept” validation prior to committing funds for
large scale fielding of a system without knowing if it really
works as intended by the user
6. Unit testing

• Normally programs are written as a series of individual modules,


these subject to separate and detailed test
7. Integration and System testing

 Brings all the pieces together into a special testing environment, then
checks for errors, bugs and interoperability. The system is tested to
ensure that interfaces between modules work (integration testing),
the system works on the intended platform and with the expected
volume of data (volume testing) and that the system does what the
user requires (acceptance/beta testing).
8. Maintenance

What happens during the rest of the software's life: changes,


correction, additions, moves to a different computing platform and
more. This, the least fashionable and perhaps most important step of
all, goes on seemingly forever

You might also like