oops concept in c++ unit 3 -topic 4

Post on 13-Feb-2017

54 Views

Category:

Education

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

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

Programming paradigm

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.

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

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. 

OOPS CONCEPT IN C++

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

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.

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.

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.

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.

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..

top related