Program Analysis
Program Analysis
A Problem Analysis investigates a situation/problem in order Software documentation is written text or illustration that The condition part specifies all
to allow the researcher to understand more fully the problem,
in order to recommend practical solutions for solving it. Thus,
the problem analysis would report that the lighting was not
accompanies computer software or is embedded in the source
code. The documentation either explains how the software
operates or how to use it, or may mean different things to
FLOWCHARTING conditions that are applied to the
inputted data. It is also divided into two
parts à
the cause of the problem, saving the company time and Flowchart is a graphical representation of an
people in different roles. i. Condition
algorithm. Programmers often use it as a program-
money. Documentation is an important part of software Stub:-
planning tool to solve a problem. It makes use of
engineering. Types of documentation include: It describes the
symbols which are connected among them to indicate
The following are steps involves in problem analysis the flow of information and processing.
conditions that exist in
the program logic.
· Requirements – Statements that identify attributes The process of drawing a flowchart for an algorithm is
a. Understand your problem ii. Condition
capabilities, characteristics, or qualities of a system. This is the known as “flowcharting”.
b. Break the problem Entry:-
foundation for what will be or has been implemented. Basic Symbols used in Flowchart Designs
c. Define problem goals It provides answers to
d. Decide how to measure progress towards goals. 1.Terminal: The oval symbol indicates Start, Stop and questions asked in the
· Architecture/Design – Overview of software. Includes condition asked in the
Halt in a program’s logic flow. A pause/halt is
relations to an environment and construction principles to be condition term.
1. Understand Your Problem: You must understand the issue, generally used in a program logic under some error
used in design of software components. conditions. Terminal is the first and last symbols in 2. Action:
problem or symptom you are experiencing before you can
the flowchart. The action part is subdivided into two
realistically try to figure out what to do about it. As a first step · Technical – Documentation of code, algorithms, parts à
towards self – help, take steps to understand the nature of 2.Input/Output: A parallelogram denotes any function
interfaces, and APIs. of input/output type. Program instructions that take i. Action Stub:-
your problem. It describes the action to
input from input devices and display output on output
· End user – Manuals for the end-user, system devices are indicated with parallelogram in a be taken to meet each
2. Break the Problem Down Into Small Parts: Even when you administrators and support staff. flowchart. condition.
understand what your problem is, it may be too big and too 3.Processing: A box represents arithmetic ii. Action Entry:-
well established for you to figure out how to fix all at once. · Marketing – How to market the product and analysis of instructions. All arithmetic processes such as adding, It describes the
Instead of trying to tackle the entire problem all at once, the market demand. subtracting, multiplication and division are indicated appropriate action
break it down into manageable parts. Then, make a plan for by action or process symbol. resulting from the answer
how you will fix or address each part separately. 4.Decision Diamond symbol represents a decision to the condition in
point. Decision based operations such as yes/no condition entry.
3. Define Problem Goals: For each of your small manageable question or true/false are indicated by diamond in Advantages of Decision Table
problem parts, figure out what your goals are; where you flowchart.
want to end up at the end of the self help process for each 5.Connectors: Whenever flowchart becomes complex 1. It provides compact
or it spreads over more than one page, it is useful to representation of decision
part of your problem. If you don't know what you are working
use connectors to avoid any confusions. It is making process.
towards, you will never know when you've arrived there.
represented by a circle. 2. It is easier to understand
6.Flow lines: Flow lines indicate the exact sequence in particular path.
4. Decide How To Measure Progress Towards Goals: Find ways 3. It can be changed according
which instructions are executed. Arrows represent the
to measure progress you make towards accomplishing each of to situation.
direction of flow of control and relationship among
your problem goals, so that you will always know: 4. These are best suited for
different symbols of flowchart.
a. What your problem starting point looked like, calculating discounts,
b. How far you've come towards meeting your goals at Advantages of Flowchart: commissions or inventory
any given moment, and control procedures.
c. How you'll know when you've met your goals and • Flowcharts are a better way of 5. The structure of decision
are done. communicating the logic of the system. table promotes a logically
• Flowcharts act as a guide for blueprint complete and consistent
problem definition.
PROGRAMMING ERRORS: during program designed.
• Flowcharts help in debugging process.
Disadvantages of Decision Table
Errors are the problems or the faults that occur in the • With the help of flowcharts programs can be
program, which makes the behavior of the program easily analyzed. 1. It cannot express the
abnormal, and experienced developers can also make • It provides better documentation. complete sequence of
these faults. Programming errors are also known as the • Flowcharts serve as a good proper operations to solve a problem
bugs or faults, and the process of removing these bugs is documentation. therefore it may be difficult for
known as debugging. • Easy to trace errors in the software. the programmer to translate
• Easy to understand. decision table into program.
These errors are detected either during the time of • The flowchart can be reused for 2. If there are too many
compilation or execution. Thus, the errors must be inconvenience in the future. alternatives, it is difficult to list in
removed from the program for the successful execution decision table.
• It helps to provide correct logic.
of the program.
There are mainly five types of errors exist in python DECISION TABLE
programming: A decision table is a graphical method for
explaining the logic of making decision in
tabular format.
• Syntax error
It is a set of conditions + set of actions and
different combinations of decisions.
• Run-time error “It is a matrix representation of logic of
decisions which specify the possible
• Linker error conditions for decision and resulting actions.”
The decision table is divided into two parts:
• Logical error 1. Condition
2. Action
1. Condition:
• Semantic error