computer programming,Low Level Language ,Machine Language
Assembly Language
High Level Language /Procedural Languages,C++ && C#,Web Page Development,XHTML (extensible HTML),JavaScript && PHP && VBScript,Dynamic HTML Dynamic HTML (DHTML)Dynamic HTML Dynamic HTML (DHTML),Algorithm,sourc code , object code
2. Programming Language
Language is used for communication .
programming language is used to communicate
with computer.
All computer programs are written in programming
language.
Every programming language has a set of
alphabets and rules. The instructions of computer
program are written by using the alphabets and
rules defined by the programming language.
There are two types of programming languages3/9/2020Gulab Devi Educational Complex lahore
2
3. Programming language
programming language is a set of words,
abbreviations, and symbols
that enables a programmer to communicate
instructions to a computer.
3/9/2020Gulab Devi Educational Complex lahore
3
4. Low Level Language
A language that is close to the language
computer itself uses is called low level
language. There are two type of low level
languages
Machine Language
Assembly Language
3/9/2020Gulab Devi Educational Complex lahore
4
5. Machine Language
Machine language is also called binary
language. There are only two number of
machine language those are 0 and 1.
Computer can understand only machine
language. The program written in other
programming languages are first translated to
machine language and then used on computer
3/9/2020Gulab Devi Educational Complex lahore
5
6. Assembly Language
It is also low level language .But is is easier than
machine language.
it was developed to make programming easy.
In assembly language machine language
instructions are replaced by English like words.
With an assembly language, the second
generation of programming languages, a
programmer writes instructions using symbolic
instruction codes . Examples of these codes
include A for addition, C for compare, L for load,
and M for multiply.
3/9/2020Gulab Devi Educational Complex lahore
6
7. High Level Language
/Procedural Languages
A programming language that is close to
human language is called high level language.
The instructions written in high level language
look like English language sentence.
High level language are easy to learn.
We can easily write and modify a program
written in high level language.
Every High Level language has its own set of
rules. These rules are called syntax of
language. 3/9/2020Gulab Devi Educational Complex lahore
7
8. High Level Language
/Procedural Languages
The C programming language, developed in the
early 1970s by Dennis Ritchie at Bell Laboratories,
originally was designed for writing system software.
Today, many programs are written in C . C runs on
almost any type of computer with any operating
system.
COBOL COBOL (COmmon Business-Oriented
Language) evolved out of a joint effort between the
United States government, businesses, and major
universities in the early 1960s. Naval officer Grace
Hopper, a pioneer in computer programming, was a3/9/2020Gulab Devi Educational Complex lahore
8
9. C++ && C#
3/9/2020Gulab Devi Educational Complex lahore
9
C++ Developed in the 1980s by Bjarne Sroustrup
at Bell Laboratories, C++ (pronounced SEE-plus-
plus) is an object-oriented programming language
that is an extension of the C programming
language.
C# Based on C++, C# (pronounced SEE-sharp) is
an object-oriented programming language that
was developed primarily by Anders Hejlsberg
10. High level language are
easy to learn.
These are near to
human language
Translator is required
Programs in high-level
languages are easy to
modify
Deep knowledge of
hardware is not required
to write programs
Low level language are
difficult to learn
These are far from
human languages
No Translator is
required
Program in low level
are difficulty to modify
Deep knowledge of
hardware is required
to write program
High Level Low Level
3/9/2020Gulab Devi Educational Complex lahore
10
11. Web Page Development
The designers of Web pages, known as Web
developers, use a variety of techniques to create
Web pages.
HTML and XHTML HTML (Hypertext Markup
Language) is a special formatting language that
programmers use to format documents for display
on the Web. You view a Web page written with
HTML in a Web browser such as Internet Explorer,
Mozilla, Safari, Firefox, Opera, or Google Chrome.
3/9/2020Gulab Devi Educational Complex lahore
11
12. XHTML (extensible HTML)
XHTML (extensible HTML) is a markup language
that enables Web sites to be displayed more easily
on micro browsers in smart phones and other
mobile devices, as well as on desktop and
notebook computers
3/9/2020Gulab Devi Educational Complex lahore
12
13. JavaScript && PHP &&
VBScript
JavaScript is an interpreted language that allows a
programmer to add dynamic content and interactive
elements to a Web page
PHP, which stands for PHP: Hypertext Preprocessor,
is a free, open source scripting language. PHP is
similar to C, Java, and Perl.
VBScript (Visual Basic, Scripting Edition) is a
subset of the Visual Basic language that allows
programmers to add intelligence and interactivity to
Web pages. As with JavaScript, Web developers
embed VBScript code directly into an HTML3/9/2020Gulab Devi Educational Complex lahore
13
14. Dynamic HTML Dynamic
HTML (DHTML)
Dynamic HTML Dynamic HTML (DHTML) is a
newer type of HTML that allows Web developers to
include more graphical interest and interactivity in a
Web page.
3/9/2020Gulab Devi Educational Complex lahore
14
15. Web Page Authoring
Software
Dreamweaver:
By Adobe Systems, is a Web page authoring
program that allows Web developers to create,
maintain, and manage professional Web sites.
Notepad ++
Visual Studio
Subline Text Editor etc
3/9/2020Gulab Devi Educational Complex lahore
15
16. Algorithm
From programming point of view, an algorithm
is a step-by-step procedure to resolve any
problem. An algorithm is an effective method
expressed as a finite set of well-defined
instructions.
Thus, a computer programmer lists down all
the steps required to resolve a problem before
writing the actual code. Following is a simple
example of an algorithm to find out the largest
number from a given list of numbers
3/9/2020Gulab Devi Educational Complex lahore
16
17. Algorithm Example
Example 1: Print 1 to 20:
Step 1: Initialize X as 0,
Step 2: Increment X by 1,
Step 3: Print X,
Step 4: If X is less than 20 then go back to
step 2.
3/9/2020Gulab Devi Educational Complex lahore
17
18. Flow Chart
A flowchart is the graphical or pictorial
representation of an algorithm with the help of
different symbols, shapes and arrows in order
to demonstrate a process or a program. With
algorithms, we can easily understand a
program. The main purpose of a flowchart is to
analyze different processes. Several standard
graphics are applied in a flowchart:
3/9/2020Gulab Devi Educational Complex lahore
18
20. Difference b/w Flow Chart &
Algorithms
Stander Symbols are
used to design
flowcharts
Flow chart is more
time –consuming
It is difficult to modify
It is a graphical
representation of the
solution
Simple English is
used to write
algorithms
Algorithm is less
time consuming
It is easier to modify
It is a step by step
procedure to solve
the problem
Flow Chart Algorithms
3/9/2020Gulab Devi Educational Complex lahore
20
21. High Level Language
C
C++
JAVA
C#
PHP
JAVA SCRIPT
Etc
3/9/2020Gulab Devi Educational Complex lahore
21
22. C++ Program
#include <iostream> using namespace std; //
main() is where program execution begins. int
main() { cout << "Hello World"; // prints Hello
World return 0; }
3/9/2020Gulab Devi Educational Complex lahore
22
23. Source Code
A computer program written in high level
language is called source program is also
called source code.
Computer cannot understand source code.
It can understand only machine code.
Source code cannot directly run on computer.
It is converted into machine code before
execution
3/9/2020Gulab Devi Educational Complex lahore
23
24. Object Code
A computer program in machine language is
called object program also called object code.
Machine Language is native language of
computer so object code directly runs on
computer.
3/9/2020Gulab Devi Educational Complex lahore
24
25. Difference b/w Source & Object
Code
Source code is
written in high level
language
Source code is easy
to understand
Source code is easy
to modify
Object code is
written in machine
language
Object code is
difficult to
understand
Object code is
difficult to modify
Source Code Object Code
3/9/2020Gulab Devi Educational Complex lahore
25
26. Compiler
Now let us try to get a little more detail on how the
computer understands a program written by you
using a programming language.
Actually, the computer cannot understand your
program directly given in the text format, so we
need to convert this program in a binary format,
which can be understood by the computer.
The conversion from text program to binary file is
done by another software called Compiler and this
process of conversion from text formatted program
to binary format file is called program compilation.3/9/2020Gulab Devi Educational Complex lahore
26
28. interpreter
Compilers are required in case you are going
to write your program in a programming
language that needs to be compiled into binary
format before its execution.
There are other programming languages such
as Python, PHP, and Perl, which do not need
any compilation into binary format, rather an
interpreter can be used to read such programs
line by line and execute them directly without
any further conversion.
3/9/2020Gulab Devi Educational Complex lahore
28
30. interpreter
So, if you are going to write your programs in
PHP, Python, Perl, Ruby, etc., then you will
need to install their interpreters before you
start programming.
3/9/2020Gulab Devi Educational Complex lahore
30
31. Difference b/w Compiler and
interpreter
Compiler converts a
program into machine
code as a whole
Compiler create object
code file
Program execution is
fast
Compiler displays
syntax error after
Interpreter converts a
program into machine
code statement by
statement
Interpreter does not
create object code file
Program execution is
slow
Display the syntax
Compiler Interpreter
3/9/2020Gulab Devi Educational Complex lahore
31
33. Syntax Error
In effect, syntax errors represent grammar
errors in the use of the programming
language. Common examples are:
Misspelled variable and function names
Missing semicolons
Improperly matches parentheses, square
brackets, and curly braces
Incorrect format in selection and loop
statements
3/9/2020Gulab Devi Educational Complex lahore
33
34. Runtime Error
Runtime errors occur when a program with no
syntax errors asks the computer to do
something that the computer is unable to
reliably do. Common examples are:
Trying to divide by a variable that contains a
value of zero
Trying to open a file that doesn't exist
There is no way for the compiler to know about
these kinds of errors when the program is
compiled.
3/9/2020Gulab Devi Educational Complex lahore
34
35. Logical Error
Logic errors occur when there is a design flaw
in your program.
Common examples are:
Multiplying when you should be dividing
Adding when you should be subtracting
Opening and using data from the wrong file
Displaying the wrong message
3/9/2020Gulab Devi Educational Complex lahore
35
36. Which Error are Difficult to
find ?
3/9/2020Gulab Devi Educational Complex lahore
36
39. Object
This is the basic unit of object oriented
programming. That is both data and function
that operate on data are bundled as a unit
called as object.
3/9/2020Gulab Devi Educational Complex lahore
39
41. Abstraction
Data abstraction refers to, providing only
essential information to the outside world and
hiding their background details, i.e to
represent the needed information in program
without presenting the details.
For example, a database system hides certain
details of how data is stored and created and
maintained. Similar way, C++ classes provides
different methods to the outside world without
giving internal detail about those methods and
data 3/9/2020Gulab Devi Educational Complex lahore
41
42. Encapsulation
The wrapping of
Data and
operation/
function in to a
single unit is
known as
encapsulation
3/9/2020Gulab Devi Educational Complex lahore
42
43. Class
When you define a class, you define a
blueprint for an object. This doesn't actually
define any data, but it does define what the
class name means, that is, what an object of
the class will consist of and what operations
can be performed on such an object.
3/9/2020Gulab Devi Educational Complex lahore
43
45. Inheritance
One of the most useful aspects of object-
oriented programming is code reusability. As
the name suggests Inheritance is the process
of forming a new class from an existing class
that is from the existing class called as base
class, new class is formed called as derived
class.
This is a very important concept of object-
oriented programming since this feature helps
to reduce the code size.
3/9/2020Gulab Devi Educational Complex lahore
45
46. Polymorphism
The ability to use an operator or function in
different ways in other words giving different
meaning or functions to the operators or
functions is called polymorphism. Poly refers
to many. That is a single function or an
operator functioning in many ways different
upon the usage is called polymorphism.
3/9/2020Gulab Devi Educational Complex lahore
46