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

Program Analysis

This document discusses program analysis and documentation. It can be summarized as follows: 1. Program analysis involves investigating a problem situation to understand it fully and recommend practical solutions. This allows identifying that lighting was not the actual cause, saving time and money. 2. Software documentation includes requirements, architecture/design, technical documentation, and end user manuals. It is an important part of software engineering. 3. Flowcharting uses graphical symbols to represent algorithms and the flow of information. Basic symbols include terminals, input/output, processing, and decision diamonds. Flowcharting aids in problem solving.

Uploaded by

Faizan Ahmad
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
71 views

Program Analysis

This document discusses program analysis and documentation. It can be summarized as follows: 1. Program analysis involves investigating a problem situation to understand it fully and recommend practical solutions. This allows identifying that lighting was not the actual cause, saving time and money. 2. Software documentation includes requirements, architecture/design, technical documentation, and end user manuals. It is an important part of software engineering. 3. Flowcharting uses graphical symbols to represent algorithms and the flow of information. Basic symbols include terminals, input/output, processing, and decision diamonds. Flowcharting aids in problem solving.

Uploaded by

Faizan Ahmad
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Program Analysis PROGRAM DOCUMENTATION:

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

Object-oriented Programming Top-Down Design Model:


STRUCTURED PROGRAMMING therefore contain encapsulation and
redundancy. data hiding.
CONCEPT Here the solution revolves around entities or objects In the top-down model, an overview of the
that are part of problem. The solution deals with how system is formulated without going into detail
Structured Programming Approach, as the word 4. In this the In this module
to store data related to the entities, how the entities for any part of it. Each part of it then refined
suggests, can be defined as a programming communications must have
behave and how they interact with each other to give a into more details, defining it in yet more details
approach in which the program is made as a single
cohesive solution. until the entire specification is detailed enough is less among communication.
structure. It means that the code will execute the
Example − If we have to develop a payroll to validate the model. if we glance at a haul as modules.
instruction by instruction one after the other. It
doesn’t support the possibility of jumping from one
management system, we will have entities like a full, it’s going to appear not possible as a
employees, salary structure, leave rules, etc. around result of it’s so complicated For example: 5. It is used in It is basically used
instruction to some other with the help of any
which the solution must be built. Writing a University system program, writing a debugging, in testing.
statement like GOTO, etc. Therefore, the
instructions in this approach will be executed in a word processor. Complicated issues may be module
Functional Programming resolved victimization high down style, documentation,
serial and structured manner. The languages that
conjointly referred to as Stepwise refinement
support Structured programming approach are:
Here the problem, or the desired solution, is broken
etc.
where,
C down into functional units. Each unit performs its own
task and is self-sufficient. These units are then 1. We break the problem into parts, 6. In top down In bottom up
C++ approach, approach
stitched together to form the complete solution. 2. Then break the parts into parts soon and
Java
C# Example − A payroll processing can have functional now each of parts will be easy to do. decomposition composition takes
units like employee data maintenance, basic salary takes place. place.
The structured program mainly consists of three calculation, gross salary calculation, leave Advantages:
types of elements: processing, loan repayment processing, etc. 7. In this top In this sometimes
• Breaking problems into parts help us to function of system we can not build a
identify what needs to be done.
• Selection Statements Logical Programming might be hard to program from the
• Sequence Statements • At each step of refinement, new parts will identify. piece we have
Here the problem is broken down into logical units become less complex and therefore easier to
• Iteration Statements
rather than functional units. Example: In a school solve.
started.
Advantages of Structured Programming Approach:
management system, users have very defined roles • Parts of the solution may turn out to be 8. In this This is not natural
1. Easier to read and understand like class teacher, subject teacher, lab assistant, reusable.
implementation for people to
2. User Friendly coordinator, academic in-charge, etc. So the software • Breaking problems into parts allows more
details may differ. assemble.
3. Easier to Maintain can be divided into units depending on user roles. than one person to solve the problem.
4. Mainly problem based instead of being machine Each user can have different interface, permissions,
based etc. Bottom-Up Design Model:
5. Development is easier as it requires less effort Software developers may choose one or a
and time combination of more than one of these methodologies In this design, individual parts of the system
6. Easier to Debug to develop a software. Note that in each of the are specified in detail. The parts are linked to
7. Machine-Independent, mostly. methodologies discussed, problem has to be broken form larger components, which are in turn
down into smaller units. To do this, developers use linked until a complete system is formed.
Disadvantages of Structured Programming any of the following two approaches − Object-oriented language such as C++ or java
Approach: uses a bottom-up approach where each object
• Top-down approach is identified first.

• Bottom-up approach Advantage:


1. Since it is Machine-Independent, So it takes
time to convert into machine code. • Make decisions about reusable low-level
2. The converted machine code is not the same as utilities then decide how there will be put
for assembly language. together to create high-level construct. ,
PROGRAMMING METHODOLOGIES • The contrast between Top-down design and
bottom-up design.
When programs are developed to solve real-life
problems like inventory management, payroll S.No. TOP DOWN BOTTOM UP
processing, student admissions, examination result APPROACH APPROACH
processing, etc. they tend to be huge and complex.
The approach to analyzing such complex problems,
planning for software development and controlling the 1. In this approach In bottom up
development process is called programming We focus on approach, we
methodology. breaking up the solve smaller
problem into problems and
Types of Programming Methodologies smaller parts. integrate it as
whole and
There are many types of programming methodologies
complete the
prevalent among software developers −
solution.
Procedural Programming
2. Mainly used by Mainly used by
Problem is broken down into procedures, or blocks of structured object oriented
code that perform one task each. All procedures taken programming programming
together form the whole program. It is suitable only language such as language such as
for small programs that have low level of complexity. COBOL, Fortran, C++, C#, Python.
Example − For a calculator program that does C, etc.
addition, subtraction, multiplication, division, square
root and comparison, each of these operations can be 3. Each part is Redundancy is
developed as separate procedures. In the main programmed minimized by
program each procedure would be invoked on the
separately using data
basis of user’s choice.

You might also like