You are on page 1of 39

Hafiz Faraz Iqbal

 A set of Instruction that tell a computer what


to do is called Program

 A person who develops a program is called


programmer
 A computer program can solve many problem
by giving instructions to computer.

 A program can process a large amount of


data easily.

 It can display the result in different styles.


 Analysis

 Critical Thinking

 Attention to Detail
To design a program properly, we must:
◦ Analyze a problem statement, typically
expressed as a word problem
◦ Express its essence, abstractly and with
examples
◦ Formulate statements and comments in a
precise language
◦ Evaluate and revise the activities in light of
checks and tests
◦ PAY ATTENTION TO DETAIL

◦ These skills are useful for


anybody
Computers are STUPID
Think Reuse
Inner Circle

Outer Circle

Area of Outer Circle ____ Area of Inner Circle = Area of the Ring
1. Analyze: Define the problem
2. Design: Plan the solution to the problem
3. Choose the Interface: Select the objects
4. Code: Translate the algorithm into a
programming language.
5. Debug and Test: Locate and remove any
errors in the program.
6. Complete the Documentation: Organize all
the materials that describe the program.
 An algorithm is a step by step procedure to
solve a problem
 The process of solving a problem becomes
simpler and easier with the help of algorithm
 It is better to write algorithm before writing the
actual computer program
 Algorithms are written in a language that is
similar to simple English called pseudo code
 Start
 Input A
 Input B
 Total=A+B
 Display Total
 Exit
 Flowchart is combination of two words flow
and chart
 A chart consists of different symbols to
display information about any program
 Flow indicates the direction of processing
that take place in the program
 Flowchart is a graphical representation of an
algorithm
Flowchart is used for the following reasons
 Flowchart is used to represent an algorithm in
simple graphical manner.
 Flowchart is used to show the steps of an
algorithm in an easy way
 Flowchart is used to understand the flow of
the program
 Flowchart is used to improve the logic for
solving a problem
 The process of testing the flowchart with different
data as input, and checking the output.

 The test data should include nonstandard data as


well as typical data.
 It is difficult to draw flowchart for complex
problems

 The flowchart has to be redesigned if any


change is required
Flowchart Algorithm

Standard symbols are used to Simple English is used to write


design flowchart algorithm

More time consuming Less time consuming

Difficult to modify Easier to modify

Graphical representation of Step by step procedure to solve a


solution problem
 A set of words symbols and codes to write
program is called program language

 Different programming languages are


available for writing different type of
programs.
There are two types of computer
programming languages:

 Low Level languages

 High Level languages


 These languages are near to computer
hardware and far from human languages.
 Computer can understand this languages
easily.
 Writing a program in low level languages
requires a deep knowledge of internal
structure of computer hardware
Two low level languages are

 Machine language

 Assembly language
 A type of language in which instruction are
written in binary form is called machine
language
• Executed Fast
• Machine dependent
• Every computer has its own machine
language
• Difficult to understand
• Writing and modifying program in machine
language take a lot of time.
 Machine language is also known as first
generation language
 It is one step higher than machine language
 In assembly language symbols are used
instead of binary code. These symbols are
called mnemonics.
 Assembly language is also called symbolic
language
 Program written in assembly language are
easier to write and modify than machine
language
 Assembly language is also known as second
generation language
 A type of language that is close to human
language is called high level language.
 High level language are easy to understand
 Instruction of these languages are written in
English like words such as input and print etc
 A program written in high level language is
easier to write and modify.
High level languages are further divided into
following categories:

 Procedural languages
 Object Oriented languages
 Non Procedural languages
 Procedural languages are also known as third
generation language or 3GL
 In these language program is predefined set
of instructions
 Computer executes these instruction in the
same sequence in which the instructions are
written
 Each instruction in this language tells the
computer what to do and how to do.
Some most popular languages are
 FORTRAN (FORmula TRANslation)
Used for engineering application and scientific
use
 BASIC(Beginner All Purpose Symbolic
Instruction Code)
• It was used mainly by students to use the
computer for solving simple problems.it is
easy to understand. It is widely used for
education purpose
 COBOL(Common Business Oriented
Language)
It is specially designed for business
application
 PASCAL
This language is used for both scientific and
business applications. Its name was assigned
in the honor of French mathematician Pascal
 C
C language is a popular high level language
 OOP is a technique in which programs are
written on the basis of objects.
 An object is a collection of data and
functions.
 Object may represent a person thing or place
in real world
 Objects

 Classes

 Real world Modeling

 Reusability

 Information Hiding

 Polymorphism
 C++
C++ is an object oriented language. It is an
improved version of C language. It provides
the facility of working with object and
classes. It is very powerful language and is
used to develop a variety of programs
 Java
It was primarily developed to control the
microprocessors. It provides powerful
capabilities of network programming Internet
application and graphical user Interface (GUI).
 Non procedural language are also known as
fourth generation languages or 4GL
 In non procedural languages user only need
to tell the computer “what to do” not “how to
do”
 An important advantage of non procedural
languages is that they can be used by non
technical user to perform a specific task
 4GL are normally used in database
applications and report generation.
 SQL (Structured Query Language)

• It is the most popular database query language


• SQL was developed by IBM
• SQL works with database program like MS
Access Oracle
Procedural Language Non Procedural Language
Procedural language tells the Non Procedural language tells the
computer what to do computer what to do, not how to
do
It is difficult to learn It is easy to learn
It is difficult to debug It is easy to debug
It requires large number of It requires a few non procedural
procedural instruction instructions
It is normally used by professional It can be used professional and
programmers non technical users

You might also like