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

Pograming Language

This document provides an introduction to computer programming. It defines what a computer program is and explains that programs provide instructions for computers to carry out tasks. The document outlines the program development cycle, including problem analysis, algorithm writing, flowchart drawing, coding, testing, and documentation. It also defines different types of computer languages like machine language, assembly language, and high-level languages. Finally, it provides some examples of applications developed using C++.

Uploaded by

Sumaira Gulzar
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)
139 views25 pages

Pograming Language

This document provides an introduction to computer programming. It defines what a computer program is and explains that programs provide instructions for computers to carry out tasks. The document outlines the program development cycle, including problem analysis, algorithm writing, flowchart drawing, coding, testing, and documentation. It also defines different types of computer languages like machine language, assembly language, and high-level languages. Finally, it provides some examples of applications developed using C++.

Uploaded by

Sumaira Gulzar
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

INTRODUCTION TO PROGRAMMING

Course Instructor: Sumaira Gulzar


WHAT IS A COMPUTER PROGRAM?
• Computer works on a set of instructions called
a Computer Program, which specify the ways
to carry out a task

• A computer takes instruction in the form of a


computer program

• The human beings instruct computers in a


language understood by it
In order to design a program, a programmer
must determine three basic rudiments:
– The instructions to be performed
– The order in which those instructions are to be
performed
– The data required to perform those instructions
PROGRAM DEVELOPMENT CYCLE
• Before starting the process of writing a
program, the programmer has to determine
the problem that needs to be solved
– Problem-solving is a process that involves
discovering, analyzing and solving problems.
– The ultimate goal of problem-solving is to
overcome obstacles and find a solution that best
resolves the issue
– The problem is broken into a series of smaller
steps
• One common technique of problem solving is
Program Development Cycle
• Development cycle of a program includes the
following phases:

Problem Algorithm Drawing


Coding Testing Documentation
Analysis Writing Flowchart
1. PROBLEM ANALYSIS
Firstly, the problem is analyzed precisely and
completely. The problem clarification includes
6 mini-steps:
2. ALGORITHM WRITING
• After selecting the appropriate solution, an
algorithm is developed to depict the basic logic
of the selected solution
• An Algorithm depicts the solution in logical steps
• An algorithm is a formula or set of steps for
solving a particular problem
• It must contain a set of rules which must be
unambiguous and have a clear stopping point
• Algorithms are checked for accuracy in order
to identify major logical errors at an early
stage
• We use algorithms every day. For example, a
recipe for baking bread is an algorithm
3. DRAWING FLOWCHART
• Algorithms are represented in detail using the following
tools:
– Flowcharts (drawing tool)
– Pseudo codes (writing tool)

• The tools make program logic clear and eventually help in


coding

• Pseudo code is a method of designing a program using


normal human-language statements to describe the logic
and the processing flow

• Pseudo code is like an outline or summary form of the


program you will write
• A Program Flowchart is a chart that graphically
presents the detailed series of steps (algorithm, or
logical flow) needed to solve a programming problem

• The Flowchart uses standard symbols called ANSI


(American National Standards Institute )symbols

• Flowchart symbols, examples and practice questions


will be covered in next class
Flowchart Standard Symbols
EXAMPLE

PSEUDO CODE Flowchart


4. CODING

• After meeting all considerations, the actual


coding of the program begins
• In this step, logic of the program worked out
from pseudo code or flowcharts is translated
into a high-level programming language,
following its grammatical rules
• This step is dependent upon application
domain and available resources
• Coding includes 2 mini-steps:
5. TESTING
• Program Testing involves running various tests
and then running real world data to make sure
the program works
• Two principal activities are:
– Desk-checking: is simply reading through or
checking the program to make sure that it’s free of
errors and that the logic works
– Debugging: To debug means to detect, locate, and
remove all errors in a computer program
6. DOCUMENTATION
• After the program is free from all the errors,
developers must ensure that program is
supported by suitable documentation
• The Documentation consist of 4 mini-steps:
COMPUTER LANGUAGES
• Three types of computer languages

• 1) Machine Language
– “Natural language” of computers
– Only language computer directly understands
– Generally consist of strings of 0s and 1s
– Instruct computers to perform elementary
operations
• 2) Assembly language
– English-like abbreviations representing elementary
computer operations
– Clearer to humans
– Incomprehensible to computers
– Convert to machine language by translator
program: Assembler
• 3) High-level languages
– Similar to everyday English
– Uses common mathematical notations
– Clearer to humans
– Single statements accomplish substantial tasks
– Incomprehensible to computers
– Convert to machine language by translator
programs: Compilers
C++ APPLICATIONS IN REAL WORLD

• Adobe systems
– Photoshop and Image Ready,
– Illustrator and Acrobat
• Microsoft
– Windows XP , Microsoft Office , Internet Explorer ,
Visual Studio language c sharp

• Applications for iPod are written in C++


Programming Language for developing
different games

• https://www.youtube.com/watch?v=z39aPwv
gcEU

You might also like