Monday 4 February 2013

Object Oriented Programming Concepts In Java

Object-oriented programming (OOP) is at the core of Java. Well, all Java programs are to at least some extent object-oriented. Object-oriented programming (OOP) is so integral to Java hence that it is best to understand its basic principles before you begin writing even simple Java programs.

Two Paradigms
All computer programs consist of two elements: data and code. A program can be conceptually organized around its data or around its code. That is, some programs are written around “what is happening” and others are written around “who is being affected.” And these are the two paradigms that govern how a program is constructed. The first one is called the process-oriented model. This approach characterizes a program as a series of  steps. The process-oriented model can be assumed as code acting on data. Procedure-oriented languages such as C employ this kind of model to considerable success. 

Abstraction
An essential element of OOP is abstraction. Humans manage complexity by abstraction. For example, people do not think of a bus or car as it contains a set of tens of thousands of individual parts. People just think of it as a object with its own unique behaviour. This abstraction allows them to use a car to drive to the store without being overwhelmed by the complexity of the parts that form the car. People can ignore the details of how the transmission, engine and braking systems work. Instead of that, they are free to utilize the object as a whole one part.

The Three OOP Principles

All object-oriented programming languages provide mechanisms which help you implement the object-oriented model. And they are given below :
==> encapsulation,
==> inheritance, and
==> polymorphism.

No comments:
Write comments

Featured post

List of Universities in Karnataka offering M.Sc Computer Science

The post-graduate programme in Computer Science (M.Sc Computer Science) contains two academic years duration and having a four semesters....

Popular Posts

Copyright @ 2011-2022