Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
26 views25 pages

Concept of Computer Programming

A program is a set of instructions that a computer follows to process data and perform tasks, and learning programming enhances understanding of computers and problem-solving skills. The programming process involves defining the problem, planning the solution, coding, testing, and documenting the program, with key characteristics of a good program including flexibility, user-friendliness, and reliability. Errors in programming can be categorized into syntax, logical, and run-time errors, and debugging is essential to ensure the program functions as intended.
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)
26 views25 pages

Concept of Computer Programming

A program is a set of instructions that a computer follows to process data and perform tasks, and learning programming enhances understanding of computers and problem-solving skills. The programming process involves defining the problem, planning the solution, coding, testing, and documenting the program, with key characteristics of a good program including flexibility, user-friendliness, and reliability. Errors in programming can be categorized into syntax, logical, and run-time errors, and debugging is essential to ensure the program functions as intended.
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

Concept Of Computer

Programming
An introductory presentation
What is exactly a program?

A program is a set of
instructions that a
computer must follow in
order to process data
information and perform
tasks. The instruction
consists of statements in
computer programming
languages.
Main Reasons For Learning
Programming
• It helps you understand computers. Learning programming will make
you better in understanding the logic behind computers and will
increase your confidence level too.

• Even if you decide that programming is not for you, learning it will
help you in managing positions. It can increase your appreciation of
what computers and programmers can do
What is Programming?
Programming is also called software engineering involves steps similar
to any problem-solving tasks. Programming process seems to be easy
but actually requires time, logic building, designs, ideas, and most
importantly, the knowledge of writing code. This includes, having a
proper knowledge of main programming languages, the skill of
completing work in a short precise code etc.
Characteristics Of A Good
Program
• FLEXIBILITY: The code should be as flexible that whenever a change is
required, there should be no need to entirely rewrite the whole
program.
• USER FRIENDLY: The program should be easy to understand for
beginners. It should interact with user via understandable messages.
• PORTABILITY: It should not be bounded to only one system. A good
program runs on different systems too with or without minimal
changes.
• RELIABILITY: It refers to the ability of a program to perform its
intended task even if there are small changes in the computer system.
• SELF-DOCUMENTING: Self-documenting source code always contains
suitable names for identifiers ( variables and methods ).
Main Steps Involved In The
Programming
The five main steps involved in the programming process are as follows:
Defining the problem
Planning the solution
Coding the program
Testing the program
Documenting the program
1) Defining The Problem
The task of defining the problem is important of all steps. To plan the
solution, we have to understand and define the problem clearly.
Defining the problem includes four mini steps as follows:
1) Determining Program Objectives
2) Determining the Desired Output
3) Determining the Input Data
4) Determining the processing requirements
2) Planning The Solution
The next step is to plan the solution for the given problem by using the
structured programming techniques or program design tools.
This includes:
TOP-DOWN PROGRAM DESIGN: According to the rules of top-down
bottom design, each module has only one entry point and exit point.
Nowadays programmers use structured programming for the top
down approach.
ALGORITHM: Algorithm is a step by step method of designing a
program using normal human statements. Read this
Algorithms And Flowcharts.pptx to enhance the concept.
FLOWCHART: A flowchart is the pictorial representation of the
program logic flow. Showing the steps as boxes of various kinds and
connect them by arrows (flowlines).
3) Coding The Program
After preparing algorithms and
flowcharts, the next step is to
implement them by writing the
instructions (written and
shown in algorithm and
flowcharts) into programming
language.
Machine Language
Machine language is what computer understand. It’s in binary numbers
form. We can’t easily read or write it, that’s why programmers have
created a medium through which we can interact with computer, which
is programming language especially “High-Level Programming
Languages”.
Most popular high-level languages are:
Python, C++, C#, C, Java etc
SOURCE CODE
The code you write in
programming languages is
called source code. This
source code (written by
you) does not contain any
complex thing like binary
numbers and is easy for
people because it contains
many English words making
program development
easy.
OBJECT CODE
After you compile and run the
code, the translated program is
object code. Object code is
working in machine language.
As discussed in the previous slide, the object
code is result of translation from
programming language to machine language
but how does this process work?
Translators
Translators are programs which translate source code into object code.
There are three types of translators but two of them are for high level
languages.

COMPILERS: Compilers translate the whole program at once,


showing all the errors at same time.
INTERPRETERS: Interpreters translate the code one by one and show
error for each line at a time unlike compiler which shows all at once.
4) Testing The Program
Testing the program involves checking
that the program is doing the intended
work and debugging the program.
Computer Errors
Errors are the mistake done by programmer during the coding phase. They are of three
types:

SYNTAX ERROR: When you are writing the program and suddenly made a mistake
which violates the syntax rules, the error is syntax error. For Instance, you forgot “;” in
c++ statement.

LOGICAL ERROR: When the code is right but your logic is not. For example, if you
divide 1/0, the answer will be weird or non-satisfactory.

RUN-TIME ERROR: When you ask the program to do what hasn’t been programmed in
it, it crashes and this error is called run-time error.
Debugging The Program
Bugs are errors which occur during
writing the source code. Removing
the bugs from your software
(computer program) is called
Debugging Process.
DEBUGGING PROCESS
A) Desk Checking
A programmer sitting on his desk
reviewing the source code without
running it on PC. This is the most
initial step of debugging process.
B) Manual Testing with
Sample Data
In this phase, the programmer test
the code with sample data. In order
to check its reliability. This is the first
step involving tests primarily to check
the reliability, portability etc of a
program.
C) Structured Walkthrough
A phase, in which three of four programmers gather to check the code,
including the creator of the code. Senior programmers also involved in
this phase.
D) Attempt At Translation
The program is run through a computer, using a translator program. Th
translator attempts to translate the code from the programming
language
E) Testing Sample Data On The Computer
After all the errors have been cleared and fixed, now the program is
tested for logical errors. Sample data is used which will test every part
of the code.
F) BETA Version Testing
Companies before launching their software commercially, launch a beta
version of it so that the feedback from the users can help the
corporation improve their product, preventing loss of millions.
5) Documenting the program
Documentation is the written detailed description of the program. You
can think of it as a guide of a specific application for the user. It’s
necessary so that people can now how to efficiently use the computer
program.
Documentation are usually be made for three groups:
USERS: Those who use the program.
OPERATORS: Those who operates and manages the program.
PROGRAMMERS: Those who have written codes for the program.

You might also like