programming concept
programming concept
2210997198
Problem Definition.
Problem Analysis.
Algorithm Development. 3
Coding & Documentation.
Testing & Debugging.
Maintenance.
Problem Definition
Here, we define the problem statement and decide the boundaries of the
problem.
Maintenance
In this phase, we make the enhancements. Therefore, the solution is used
by the end-user. If the user gets any problem or wants any enhancement,
then we need to repeat all these phases from the starting, so that the
encountered problem is solved or enhancement is added.
Pseudocode
Pseudocode is a technique used to describe the distinct steps of an
algorithm in a manner that’s easy to understand for anyone with basic
programming knowledge. Although pseudocode is a syntax-free
description of an algorithm, it must provide a full description of the
algorithm’s logic so that moving from pseudocode to implementation is
merely a task of translating each line into code using the syntax of any
given programming language.
Example of pseudocode is:-
BEGIN
NUMBER s1, s2, sum
OUTPUT("Input number1:")
INPUT s1 5
OUTPUT("Input number2:")
INPUT s2
sum=s1+s2
OUTPUT sum
END
HOW TO WRITE PSEUDOCODE
1. Always capitalize the initial word (often one of the main six constructs).
2. Make only one statement per line.
3. Indent to show hierarchy, improve readability, and show nested
constructs.
4. Always end multi-line sections using any of the END keywords (ENDIF,
ENDWHILE, etc.).
5. Keep your statements programming language independent.
6. Use the naming domain of the problem, not that of the implementation.
For instance: “Append the last name to the first name” instead of “name =
first+ last.”
7. Keep it simple, concise and readable.
Flowchart
The Flowchart is the most widely used graphical representation of an
algorithm and procedural design workflows. It uses various symbols to show
the operations and decisions to be followed in a program. It flows in
sequential order.
Example:
6
Need of Sentinel Value
In programming, sentinel value is a special value that is used to terminate a
loop. The sentinel value typically is chosen so as to not be a legitimate data
value that the loop will encounter and attempt to perform with. For example,
in a loop algorithm that computes non-negative integers, the value “-1” can
be set as the sentinel value as the computation will never encounter that
value as a legitimate processing output.
1. Integer – We use these for storing various whole numbers, such as 5, 8, 67,
2390, etc.
3. Double – These include all large types of numeric values that do not come
under either floating-point data type or integer data type.
7
4. Floating-point – These refer to all the real number values or decimal
points, such as 40.1, 820.673, 5.9, etc.
5. Void – This term refers to no values at all. We mostly use this data type
when defining the functions in a program.
Creating Modules
Creating modules is a task that you would perform when you have identified
a set of routines, data types, and variables that support a common business
need and you want to create them together within a common namespace for
easier management and deployment.
Designing Quality Program
• Program Premise
• Needs Assessment
• Program Description
• Research and Evidence Filter
• Implementation Plan
• Fidelity Plan
• Measurement and Evaluation