Object-Oriented Programming

By: aathishankaran Emailed: 1730 times Printed: 2344 times    

Latest comments
By: rohit kumar - how this program is work
By: Kirti - Hi..thx for the hadoop in
By: Spijker - I have altered the code a
By: ali mohammed - why we use the java in ne
By: ali mohammed - why we use the java in ne
By: mizhelle - when I exported the data
By: raul - no output as well, i'm ge
By: Rajesh - thanx very much...
By: Suindu De - Suppose we are executing

Object-oriented programming is at the core of java. In fact, all java programs are object-oriented this isn’t an option the way that it is in C++, for example. OOP is so integral to java that you must understand it basic principles before you can write even simple java programs. Therefore, this chapter begins with a discussion of the theoretical aspects of OOP.

Two paradigms

As you know, all computer programs consist of two elements: code and data. Furthermore, a program can be conceptually organixed around its code or around its data. That is, some programs are written around “what is happening” and others are written around “who is being affected.” These are the two paradigms that govern how a program is constructed. The first way is called the process-oriented model. This approach characterizes a program as a series of linear steps (that is, code). The process-oriented model can be thought of as code acting on data. Procedural languages such as C employ this model to considerable success. However, as mentioned in the previous article, problems with this approach appear as programs grow larger and more complex.

To manage increasing complexity, the second approach, called object-oriented programming, was conceived. Object-oriented programming organizes a program around its data (that is, objects) and a set of well-defined interfaces to that data. An object-oriented program can be characterized as data controlling access to code. As you will see, by switching the controlling entity to data, you can achieve several organizational benefits.

Abstraction

An essential element of object-oriented programming is abstraction. Humans manage complexity through abstraction. For example, people do not think of a car as a set of tens of thousands of individual parts. They think of it as a well-defined object with its own unique behavior. This abstraction allows people to use a car to drive to the grocery store without being overwhelmed by the complexity of the parts that form the car. They can ignore the details of how the engine, transmission, and braking systems work. Instead they are free to utilize the object as a whole.

Hierarchical abstractions of complex systems can also be applied to computer programs. The data from a traditional process-oriented program can be transformed by abstraction into its component objects. A sequence of process steps can become a unique behavior. You can treat these objects as concrete entities that respond to messages telling them do something. This is the essence of object-oriented programming.

Object-oriented concepts form the heart of java just as they form the basis for human understanding. It is important that you understand how these concepts translate into programs. As you will see, object-oriented programming is a powerful accompanying the life cycle of any major software project, including conception, growth and aging. For example, once you have well-defined objects and clean, reliable interfaces to those objects, you can gracefully decommission or replace parts of an older system without fear.


Java Home | All Java Tutorials | Latest Java Tutorials

Sponsored Links

If this tutorial doesn't answer your question, or you have a specific question, just ask an expert here. Post your question to get a direct answer.



Bookmark and Share

Comments(1)


1. View Comment

i want to know more sample codes in object oriented programming..

View Tutorial          By: glades at 2013-01-23 08:28:33

Your name (required):


Your email(required, will not be shown to the public):


Your sites URL (optional):


Your comments:



More Tutorials by aathishankaran
Web Security Issues
The Web User's Perspective
Server-side plug-Ins
The best way to avoid security vulnerabilities with new server
JavaScript Security
Window Object
Working with Status Bar Messages
Retrieving a Portion of a String
Referencing Windows
Math Object
Frame Object
Document Object
Closing Windows
Built-in Object in Javascript
Textarea Object

More Tutorials in Java
Update contents of a file within a jar file
Tomcat and httpd configured in port 8080 and 80
Java File
Java String
Count number of vowels, consonants and digits in a String in Java
Reverse a number in Java
Student marks calculation program in Java
Handling Fractions in Java
Calculate gross salary in Java
Calculate average sale of the week in Java
Vector in Java - Sample Program
MultiLevel Inheritance sample in Java
Multiple Inheritance sample in Java
Java program using Method Overriding
Java program to check if user input is an even number

More Latest News
Most Viewed Articles (in Java )
How to Send SMS using Java Program (full code sample included)
Student marks calculation program in Java
Count number of vowels, consonants and digits in a String in Java
XML and Java - Parsing XML using Java Tutorial
What is Java?
FileReader and FileWriter example program in Java
Stack example in Java - push(), pop(), empty(), search()
Method Overriding in Java
arraycopy example in Java
Read from a COM port using Java program
How to use ArrayList in Java
Method Overloading (function overloading) in Java
InetAddress Example program in Java
The Basic Structure of a Simple Java program
The switch Statement example in Java
Most Emailed Articles (in Java)
The Unsigned Right Shift
Reverse a number in Java
Multiple Inheritance sample in Java
Java program using Method Overriding
Java program to display numbers from 1 to 10 on Applet
Insert, Delete, Search, Print an int Array in Java
Steps in using verisign certificate with Glassfish appserver
Step by Step guide to setup freetts for Java
Method Overloading sample in Java
Method Override sample in Java
How Java is Organized?
Setting Up SSL on Tomcat
Compare compareTo() function of String class with Collator and CollationKey
Applet Notinited : Applet xxxxxxxxxxxx notinited
The break Statement example in Java