J2EEOnline J2EE 

Object Programming  «Prev  Next»
Lesson 2 Object fundamentals
Objective Explore the basics of object-oriented programming.

Object Oriented Fundamentals

The goal of all programming languages is to make it easier for humans to communicate with machines.
Object-oriented programming languages extend this notion by allowing programmers to think in terms of real-world objects. Java has only added to the excitement surrounding object-oriented programming, or OOP (rhymes with hoop) for short. OOP attempts to narrow the gap between problems in the real world and solutions in the computer world.
In the real world, we naturally think in terms of "things," but pre-OOP programming languages forced programmers to think in terms of blocks of code (procedures) and the data they manipulate. OOP suggests that programmers think in terms of objects, or things, much like we think of things in the real world.

Object orientation is an approach to software development in which we focus on objects, attributes, and responsibilities. All business problems involve things and these things can be mapped to a set of objects, such as smart phones. In any given business problem the various components have attributes like screen resolution, keyboard input. These components have responsibilities such as connect to internet and display data.
The object oriented approach of system building starts with the earliest phase of analysis of the business problem. In this early phase, object modelers center on identifying the objects involved and their corresponding attributes and responsibilities. One interesting part of object orientation is that it closely parallels the real world, much more so than the traditional structured approach as used with procedural programming. This allows for a more thorough and accurate modeling of the business problem in the system design.
Object orientation can be defined as, a system of components which encapsulate data and function, inherit these things from other components, and communicate via messages with one another.
In the object oriented approach we not only identify the objects required, but we also organize them into classes of objects.