1. Basics of Object oriented system design
Hello folks!
Welcome to this
blog series. This blog is a part of our Object-oriented programming (OOP)
course based implementation of an OOP design. While we get started with actual
design it is important to start with the basics of OOP Before starting our
project, here are some general questions, we think that are essential to be
answered before moving to the coding part.
Are there any types in programming (other than languages to choose)?
Which style of programming to prefer for our system?
There are three
types in which a program can be written namely procedural programming, object
oriented programming and functional programming. So let’s start with the
definitions of each of the above.
Functional programming –
“Functional
programming (FP) is a programming paradigm — a style of building the
structure and elements of computer programs — that treats computation as the
evaluation of mathematical functions and avoids changing-state and mutable
data.” — Wikipedia
Object oriented programming –
“Object-oriented
programming (OOP) is a programming paradigm based on the concept of
“objects”, which may contain data, in the form of fields, often known
as attributes; and code, in the form of procedures, often known
as methods.” — Wikipedia
Languages used in Object Oriented
Programming:
Java, C++, C#,
Python, PHP, JavaScript, Ruby, Perl, Objective-C, Dart, Swift, Scala.
Procedural programming –
“Procedural
programming is a programming paradigm, derived from structured
programming, based upon the concept of the procedure call. Procedures,
also known as routines, subroutines, or functions, simply contain a series of
computational steps to be carried out.” — Wikipedia
Languages used in Procedural
Programming:
FORTRAN, ALGOL,
COBOL, BASIC, Pascal and C.
(Programming paradigms are a way to
classify programming languages based on
their features. Languages can be classified into multiple paradigms - Wikipedia article.)
Now from the above
it is clear that we have to choose from between object oriented and procedural
programming.
So let us see the
differences between Object-oriented programming and procedural
programming are as follows
1. In procedural programming, program is divided into small parts called functions while in object oriented
programming, program is divided into small parts called objects.
2.Procedural programming follows top
down approach while in object oriented programming follows bottom up approach.
3.There is no access specifier in procedural programming while object
oriented programming have access specifiers like private, public, protected
etc.
4.Adding new data and function is not easy in procedural programming while
it is easy in object oriented programming.
5.Procedural programming does not have any proper way for hiding data so it
is less secure whereas
object oriented programming provides data hiding so it is more secure.
6.In procedural programming, overloading is not possible whereas overloading
is possible in object oriented programming.
7.In procedural programming, function is more important than data and in
object oriented programming, data is more important than function.
We will discuss about the advantages of object oriented programming over procedural programming in the next Blog.
By-
Ashutosh
Bardapurkar (k-05)
Hrishikesh
Deshpande (k-16)
Archit
Hiwrekar (k-23)
Chinmay
Kapkar (k-33)