0% found this document useful (0 votes)
62 views48 pages

Chapter-I: Fundamentals OF Programming Language

The document discusses programming languages and object-oriented programming. It defines key concepts in OOP like classes, objects, encapsulation, inheritance, polymorphism and dynamic binding. It also describes benefits of OOP like code reuse and modularity. Low-level languages are machine-dependent while high-level languages are easier for humans but slower. Object-oriented languages emphasize data over procedures and divide programs into communicating objects.

Uploaded by

vipanarora
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
62 views48 pages

Chapter-I: Fundamentals OF Programming Language

The document discusses programming languages and object-oriented programming. It defines key concepts in OOP like classes, objects, encapsulation, inheritance, polymorphism and dynamic binding. It also describes benefits of OOP like code reuse and modularity. Low-level languages are machine-dependent while high-level languages are easier for humans but slower. Object-oriented languages emphasize data over procedures and divide programs into communicating objects.

Uploaded by

vipanarora
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 48

CHAPTER-I

FUNDAMENTALS
OF
PROGRAMMING
LANGUAGE
KNOWLEDGE
ABOUT
LANGUAGES
LANGUAGES
 Representation of expressions through

symbols and phonetics.

 Syntax of language is how to write symbols

in meaningful manner.
3/15/2018 3
 Semantics of language is meaning of

the syntax .

3/15/2018 4
TYPES OF LANGUAGES

 NATURAL LANGUAGE
Language that human can understand.

 PROGRAMMING LANGUAGE
Language that are used for
programming the computer

3/15/2018 5
CLASSIFICATION OF
PROGRAMING LANGUAGES

Programming Language

Low Level Middle Level High Level

3/15/2018 6
LOW LEVEL LANGUAGES
 Machine Language:
Language which uses the binary
digits i.e. 0 or 1.

 Assembly Language:
Language which uses mnemonics.
E.g. add c..

3/15/2018 7
 Machine dependent.

 Difficult for human’s to understand.

 Difficult to debug.

3/15/2018 8
 Difficult to write programs

 Fast in execution.

E.g. Assembly language.

3/15/2018 9
HIGH LEVEL LANGUAGE

 Easily understand by human beings

 Easy to debug

 Easy to write programs

3/15/2018 10
 Require compiler or interpreter for
translation.

 Slow in execution
e.g. PASCAL, FORTRAN etc.

3/15/2018 11
MIDDLE LEVEL LANGUAGE

 Easily understand by human beings

 Easy to debug

 Easy to write programs

3/15/2018 12
 Require compiler or interpreter for
translation

 Fast in execution
e.g. C, C++

3/15/2018 13
CLASSIFICATION OF LANGUAGES
BASED ON APPROACH USED
 Procedure -Oriented Programming
languages
e.g. PASCAL,C etc.

 Object-Oriented Programming Languages


e.g. C++,JAVA etc.

3/15/2018 14
PROCEDURE ORIENTED
PROGRAMMING LANGUAGE

 Emphasis is on doing things(algorithms).

 Large program are divided into smaller


programs known as functions.

3/15/2018 15
 Most of the functions share global data.

 Data move openly from function to


function.

3/15/2018 16
 Functions transform data from one form to
another.

 Employs top-down approach in program


design.

3/15/2018 17
OBJECT
ORIENTED
PROGRAMMING
PARADIGM
OBJECT ORIENTED
PROGRAMMING PARADIGM
 Emphasis is on data rather than procedure.

 Programs are divided into what are known

as objects.

3/15/2018 19
 Data structure are designed such that they
characterize the objects

 Function that operate on data of an object


are tied together in the data structure.

3/15/2018 20
 Data is hidden and cannot be accessed by
external functions

 Objects can communicate with each other


through functions.

3/15/2018 21
 New data and functions can be easily added
whenever necessary.

 Follows bottom-up approach in program


design.

3/15/2018 22
CONCEPTS
OF
OBJECT
ORIENTED
LANGUAGES
CONCEPTS OF OBJECT-
ORIENTED PROGRAMMING
 Objects

 Classes

 Data Abstraction

 Data Encapsulation

3/15/2018 24
 Inheritance

 Polymorphism

 Dynamic Binding

3/15/2018 25
OBJECTS

 Objects are the basic run time entities in

an object-oriented system. They may

represent a person, a place, a bank account,

a table of data or any item that the program

3/15/2018 26
must handle.Program objects should be

chosen such that they match closely with

real world objects.

3/15/2018 27
CLASSES

 Objects contain data and code to

manipulate that data. The entire set of data

and code of an object can be made a user-

defined data type with the help of class. In

fact objects are variable of type class. Once


3/15/2018 28
a class has been defined, we can create any

number of objects belonging to the class.Thus

a class is a collection of objects of similar

type.

3/15/2018 29
ENCAPSULATION

 The wrapping of data and function

into a single unit(called class) is known as

encapsulation. The data is not accessible to

the outside world and only those functions

which are wrapped in the class can access it.


3/15/2018 30
This insulation of the data from direct

access by the program is called

data hiding.

3/15/2018 31
DATA ABSTRACTION

 Abstraction refers to the act of

representing essential features without

including the background details. Classes

uses concept of abstraction and are defined

as a list of abstract attributes such as size,


3/15/2018 32
weight and cost and functions to operate on

these attributes.Since classes use the

concept of data abstraction, they are known

as Abstract Data Types(ADT) .

3/15/2018 33
INHERITANCE

 Inheritance is the process by which

objects of one class acquire the properties of

objects of another class. It supports the

concept of hierarchical classification.

3/15/2018 34
In OOP, concept of inheritance provides

the idea of reusability. This means that we

can add additional features to an existing

class without modifying it.

3/15/2018 35
POLYMORPHISM

 Polymorphism means ability to

take more than one form. For example, an

operation may exhibit different behaviour in

different instances.Polymorphism is

3/15/2018 36
extensively used in implementing

inheritance.

3/15/2018 37
DYNAMIC BINDING

 Binding refers to the linking of a

procedure call to the code to be executed in

response to the call. Dynamic binding

means that the code associated with a given

3/15/2018 38
procedure call is not known until the time

of the call at run-time. It is associated with

inheritance and polymorphism.

3/15/2018 39
MESSAGE
COMMUNICATION
An object - oriented program consists of a set
of objects that communicate with each
other.The process of programming in an
object -oriented language therefore involves
the following basic steps :
3/15/2018 40
 Creating classes that define objects and

their behavior.

 Creating objects from class definitions.

 Establishing communication among objects.

3/15/2018 41
BENEFITS OF OOP

 Through inheritance, we can eliminate

redundant code and extend use of existing

classes.

 Build programs from standard working

modules that communicate with


3/15/2018 42
one -another.

 The principle of data hiding helps

programmer to build secure programs .

 It is possible tot have multiple instances of

an object to co-exist without any

3/15/2018 43
interference.

 It is possible to map objects in the problem

domain to those objects in the program.

 It is possible to partition the work in a

project based on objects. .


3/15/2018 44
 Object-oriented systems can be easily

upgraded from small to large systems

 Software complexity can be easily managed

 The data-centred design approach enables

3/15/2018 45
us to capture more details of a model in

implementable form.

3/15/2018 46
Virtual Function

 A function qualified by virtual keyword.


When virtual function is called via a
pointer, the class of the object pointed to
determine which function definition will be
used.
 Virtual functions implement polymorphism.
3/15/2018 47
Visibility

 The ability of on object to be a server to

another.

3/15/2018 48

You might also like