Problem Analysi
Problem Analysi
USING COMPUTER
(STEPS)
Computer based problem solving is a systematic process of designing,
implementing and using programming tools during the problem solving
stage. This method enables the computer system to be more intuitive
with human logic than machine logic. Final outcome of this process is
software tools which is dedicated to solve the problem under
consideration. Software is just a collection of computer programs and
programs are a set of instructions which guides computer’s hardware.
These instructions need to be well specified for solving the problem.
After its creation, the software should be error free and well
documented. Software development is the process of creating such
software, which satisfies end user’s requirements and needs.
Problem Analysis
Program Documentati
PROBLEM ANALYSIS
Problem analysis is the process of defining a problem and decomposing overall system into smaller parts
to identify possible inputs, processes and outputs associated with the problem. This task is further
subdivided into six subtasks namely:
First, we need to know what problem is actually being solved. Making a clear statement of the problem
depends upon the size and complexity of the problem. Smaller problems not involving multiple
subsystems can easily be stated and then we can move onto the next step of “Program Design”.
However, a problem interacting with various subsystems and series of programs require complex
analysis, in-depth research and careful coordination of people, procedures and programs.
Before identifying inputs required for the system, we need to identify what comes out of the system.
The best way to specify output is to prepare some output forms and required format for displaying
result. The best person to judge an output form is the end user of the system i.e. the one who uses the
software to his benefit. Various forms can be designed by the programmer which must be examined to
see whether they are useful or not.
After having specified the outputs, the input and data required for the system need to be specified as
well. One needs to identify the list of inputs required and the source of data. For example, in a simple
program to keep student’s record, the inputs could be the student’s name, address, roll-numbers, etc.
The sources could be the students themselves or the person supervising them.
After the successful completion of all the above four steps one needs to see whether the things
accomplished so far in the process of problem solving are practical and feasible. To replace an existing
system one needs to determine how the potential improvements outperforms existing system or other
similar system.
Before concluding the program analysis stage, it is best to record whatever has been done so far in the
first phase of program development. The record should contain the statement of program objectives,
output and input specifications, processing requirements and feasibility.
PROGRAM DESIGN
The second stage in software development or problem solving using computer cycle is program design.
This stage consists of preparing algorithms, flowcharts and pseudocodes. Generally, this stage intends to
make the program more user friendly, feasible and optimized. Programmer just requires a pen and
pencil in this step in which the tasks are first converted into a structured layout without the involvement
of computer. In structured programming, a given task is divided into number of sub-tasks which are
termed as modules. Each process is further divided until no further divisions are required. This process
of dividing a program into modules and then into sub-modules is known as “top down” design approach.
Dividing a program into modules (functions) breaks down a given programming task into small,
independent and manageable tasks.
In prograem design we are mainly interested in designing:
ALGOROTHMS INTRODUCTION
Characteristics of an Algorithm
An algorithm must possess following
characteristics :
Step 1: Start
Step 2: Read principle (P), time (T) and rate (R)
Step 3: Calculate I = P*T*R/100
Step 4: Print I as Interest
Step 5: Stop
Advantages of an Algorithm
Designing an algorithm has following advantages :
FLOWCHARTS
(GUIDELINES,ADVANTAGES,DIS
ADVANTAGES )
Flowchart is basically a pictorial or diagrammatic
representation of an algorithm using standard
symbols.
In other words, flowchart is a graphical
representation that explains the sequence of
operations to be performed in order to solve a
problem under consideration.
Pesudocodes(GUIDELI
NES, ADVANTAGES&
DISADVANTAGES)
Pseudocode is structured English for describing
algorithms concisely. It is made up of two words,
namely, pseudo meaning imitation and code
meaning instructions. As the name suggests,
pseudocode does not obey the syntax rules of any
particular programming language i.e. it is not a real
programming code. It allows the designer to focus
on main logic without being distracted by
programming languages syntax.
Step 1: START
Step 2: READ P, T, R
Step 3: I = P*T*R/100
Step 4: PRINT I
Step 5: STOP
Advantages of Pseudocode
Preparing pseudocode while solving any problem
through computer has following advantages :
It allows the designer to focus on main logic without
being distracted by programming languages syntax.
Since it is language independent, it can be
translated to any computer language code.
It allows designer to express logic in plain natural
language.
It is easier to write actual code using pseudocode.
Unlike algorithms, pseudocodes are concise so
pseudocodes are more readable and easier to
modify.
Disdvantages of Pseudocode
Pseudocode has following disadvantages :
CODING(PROGRAMMIN
G)
In this stage, process of writing actual
program takes place. A coded program
is most popularly referred to as a
source code. The coding process can be
done in any language (high level and
low level). The actual use of computer
takes place in this stage in which the
programmer writes a sequence of
instructions ready for execution. Coding
is also known as programming.
COMPILATION AND
(EXECUTION PROCESS)
Generally coding is done in high level
language or low level language (assembly
language). For the computer to understand
these languages, they must be translated
into machine level language. The translation
process is carried out by a
compiler/interpreter (for high level
language) or an assembler (for assembly
language program). The machine language
code thus created can be saved and run
immediately or later on.
DEBUGGING AND
TESTING (ERROR AND
TYPES INCLUDED)
To understand
debugging and testing
more intuitively, lets
first consider learning
about different types of
error that occurs while
programming.
Error
Error means failure of compilation and
execution of the computer program or not
getting expected results after execution.
Debugging and testing are systematic
process during program development cycle
to avoid errors in the program. Different
types of error that we encounter while
programming are listed below :
Types of Error:
Syntax Error : Syntax error is a violation of
programming rules while writing it. A syntax
error does not allow the code to run. Syntax
error can be easily detected during the
compilation process using compiler.
Logical Error : Logical error occurs when a
programmer has applied incorrect logic for
solving problem or left out a programming
procedure. When logical error occurs
program executes but fails to produce a
correct result.
Run Time Error : Run time error occurs
during the execution of program. Stack
overflow, divide by zero, floating point error
etc. are examples of runtime error.
Debugging
Debugging is the process of finding errors
and removing them from a computer
program, otherwise they will lead to failure
of the program. Even after taking full care
during program design and coding, some
errors may remain in the program and
these errors appear during compilation or
linking or execution. Debugging is generally
done by program developer.
Testing
Testing is performed to verify that whether
the completed software package functions
or works according to the expectations
defined by the requirements. Testing is
generally performed by testing team which
repetitively executes program with intent to
find error. After testing, list of errors and
related information is sent to program
developer or developmen team.
Debugging vs Testing
Major differences between debugging and
testing are pointed below :
Program
(Programmer's and
User's) Documentation
The program documentation is the process of
collecting information about the program. The
documentation process starts from the problem
analysis phase to debugging and testing.
Documentation consists two types of
documentation, they are:
Programmer's Documentation
User's Documentation
Programmer's Documentation
Programmer’s documentation contains all the
technical details. Without proper documentation it
is very difficult even for the original programmer to
update and maintain the program. A programmer’s
documentation contains the necessary information
that a programmer requires to update and maintain
the program. These information includes: