oops concept in c++ unit 3 -topic 4

20
A PROGRAMMING PARADIGM IS A STYLE OR “WAY” OF PROGRAMMING. Programming paradigm

Upload: mohit-tomar

Post on 13-Feb-2017

53 views

Category:

Education


0 download

TRANSCRIPT

Page 1: Oops concept in c++ unit 3 -topic 4

A PROGRAMMING PARADIGM IS A STYLE OR “WAY” OF PROGRAMMING.

Programming paradigm

Page 2: Oops concept in c++ unit 3 -topic 4

PROCEDURAL PROGRAMMINGProcedural programming is a list or

set of instructions telling a computer what to do step by step and how to perform from the first code to the second code. 

Procedural programming languages include C, Go, Fortran, Pascal, and BASIC.

Page 3: Oops concept in c++ unit 3 -topic 4

MODULAR PROGRAMMINGModular programming is a software

design technique that emphasizes separating the functionality of a program into independent,

In modular programming ,a program consists of a number of modules ,which in most case work independently of all other

Page 4: Oops concept in c++ unit 3 -topic 4
Page 5: Oops concept in c++ unit 3 -topic 4

WHAT IS THE DIFFERENCE BETWEEN PROCEDURAL PROGRAMMING AND MODULAR PROGRAMMING?Procedural programming involves

following an algorithm or a procedure to implement on your software.

Whereas modular programming involving dividing your objective into modules and then pipelining the modules to obtain the defined output. 

Page 6: Oops concept in c++ unit 3 -topic 4

OOPS CONCEPT IN C++

1. Object2. Class3.Encapsulation4.Abstraction5.Inheritance6.Polymorphism

Page 7: Oops concept in c++ unit 3 -topic 4

OBJECT & CLASS

Object is the physical as well as logical entity where as class is the only logical entity.

ORObject is an identifiable entity with

some characteristics and behavior.Class is a template blue-print

representing a group of object that share common properties and relationship.

Page 8: Oops concept in c++ unit 3 -topic 4
Page 9: Oops concept in c++ unit 3 -topic 4
Page 10: Oops concept in c++ unit 3 -topic 4

ENCAPSULATIONEncapsulation is a process of wrapping of

data and methods in a single unit is called encapsulation.

Encapsulation is achieved in C++ language by class concept.OR

Encapsulation is the packing of data & function into a single component. The feature of encapsulation are supported using class.

Page 11: Oops concept in c++ unit 3 -topic 4
Page 12: Oops concept in c++ unit 3 -topic 4

ABSTRACTION IN C++

Abstraction is the concept of exposing only the required essential characteristics and behavior with respect to a context.

Hiding of data is known as data abstraction.

In object oriented programming language this is implemented automatically while writing the code in the form of class and object.

Page 13: Oops concept in c++ unit 3 -topic 4
Page 14: Oops concept in c++ unit 3 -topic 4

C++ INHERITANCEInheritance in Object Oriented

Programming can be described as a process of creating new classes from existing classes.

New classes inherit some of the properties and behavior of the existing classes.

An existing class that is "parent" of a new class is called a base class.

Page 15: Oops concept in c++ unit 3 -topic 4
Page 16: Oops concept in c++ unit 3 -topic 4
Page 17: Oops concept in c++ unit 3 -topic 4
Page 18: Oops concept in c++ unit 3 -topic 4

POLYMORPHISM IN C++ The word polymorphism means

having many forms. Typically, polymorphism occurs when

there is a hierarchy of classes and they are related by inheritance.

The process of representing one Form in multiple forms is known as Polymorphism..

Page 19: Oops concept in c++ unit 3 -topic 4
Page 20: Oops concept in c++ unit 3 -topic 4