Programming
Paradigms
Paradigm means organizing principle
of a program. It is an approach to programming. There are different approaches available for problem
solving using computer. They are Procedural programming, Modular Programming
and Object Oriented Programming
Procedural
means a list of instructions were given to the computer to do something.
Procedural programming aims more at procedures. This emphasis on doing things.
•
Programs are organized in the form of subroutines or sub programs
•
All data items are global
•
Suitable for small sized software application
•
Difficult to maintain and enhance the program code as any change in data type
needs to be propagated to all subroutines that use the same data type. This is
time consuming.
•
Example: FORTRAN and COBOL.
Modular
programming consist of a list of instructions that instructs the computer to do
something. But this Paradigm consists of
multiple modules, each module has a set of functions of related types. Data is
hidden under the modules. Arrangement of data can be changed only by modifying the module
•
Emphasis on algorithm rather than data
•
Programs are divided into individual modules
•
Each modules are independent of each other and have their own local data
•
Modules can work with its own data as well as with the data passed to it.
•
Example: Pascal and C
Object
Oriented Programming paradigm emphasizes on the data rather than the algorithm.
It implements programs using classes
and objects.
Class: A Class is a construct in C++ which is used to bind data and its
associated function together into a single unit using the encapsulation
concept. Class is a user defined data type. Class represents a group of similar
objects.
It can also be defined as a template
or blueprint representing a group objects that share common properties and
relationship.
Objects: Represents data and its associated function together into a single unit.
Objects are the basic unit of OOP. Basically an object is created from a class.
They are instances of class also called as class variables
An identifiable
entity with some characteristics and behaviour is called object.
•
Emphasizes on data rather than algorithm
•
Data abstraction is introduced in addition to procedural abstraction
•
Data and its associated operations are grouped in to single unit
•
Programs are designed around the data being operated
•
Relationships can be created between similar, yet distinct data types
•
Example: C++, Java, VB.Net, Python etc.
Related Topics
Privacy Policy, Terms and Conditions, DMCA Policy and Compliant
Copyright © 2018-2023 BrainKart.com; All Rights Reserved. Developed by Therithal info, Chennai.