Procedural-Oriented Programming:
In computer, a language is used to write instructions for the computer. A computer language is instruction , or a set of command, and other syntax use to create a s/w program
Procedural-Oriented Programming As
of now, most of the programs we have been writing used the procedural
programming paradigm. In procedural oriented programming, focus is on writing
procedures or functions which operate the data. In Oops is on the creation of
objects which contain both data and functionality together. In procedural
programming, a given problem is divided into small sized sub problems; each sub
problem representing a specific task that can be handled efficiently and effectively.
Then to solve each sub problem, a function/procedure is written. In this
approach, there is no mention of data
Object-oriented programming: is the successor of Structural Programming Language. Procedural programming describes programs reuse of code units which define I/o parameters.
Procedural programs concept consist of procedures, which invoke
each other. The object-oriented programming treats the data as the most critical
element in the program design and does not allow it to be scattered around the program.
It ties the data and functions that operate on it and protects it from the
other functions. There is no way to work with abstract data structures with
different implementations.
Data Abstraction
In plain English, Abstraction means
working with something we know how to use without knowing how it works internally.
That is hiding internal details and showing functionality is known as
abstraction.
We don't need to know the inner workings of a TV, in order to
use it. All we need is a remote control with a small set of buttons (the
interface of the remote) and we will be able to watch TV. Abstraction in Java
is done by using an interface and abstract class in Java. In order to use an
interface or abstract class we need to explain the methods of an interface or
abstract class in a sub-class.
Encapsulation The most important
aspect of an object-oriented software system is that it links together data and
the operations that are performed on that data. The reason why this is seen as
an advantage in programming is that it reflects objects in the real world and,
after all, it is people in the real
Any 'teal world' object we choose to investigate can be
described in terms of what it is called (its identity), what it is (its state)
and what it does (its behavior).If we pick up a coffee cup, we might say that
it has a name ('coffee cup'), a state (it may be white, hot, full etc.) and has
certain fixed behavior (it can be manufactured, filled, drunk from, carried,
washed and broken, for example).These elements are all 'encapsulated' into one
object - we cannot divorce any one from the others
Information Hiding :We
have defined the term 'encapsulation' as meaning that we represent in software
some kind of unit which, like real world objects, has both state and behavior.
This integration of state and behavior allows us to implement
'information hiding' (a term first coined by David Parnas ).Which means that
encapsulation hides private elements of an object behind a public interface.
This separation between the public and private parts of an encapsulated object has two aspects — protection of the object's state from unforeseen external influences, and hiding of their implementation details used to define an object's behavior. Unless we resort to conjuring tricks, this state can only be affected by specific operations: being filled (from kettle, jug etc.) or being. No other external effect can change the state of 'fullness'.
For more understanding you can also read below mentioned topic
from online:
data abstraction vs functional abstraction
0 Comments
if you have any doubts ,please let me know