Index: > A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Business Industries Finance Tax

Home > Object-oriented programming


First Prev [ 1 2 3 4 5 ] Next Last

Object-oriented programming (OOP) is a computer programming paradigm that emphasizes the following aspects:

It is in fact a set of ideas which mostly existed before. They have been brought together, with associated terminology, to create a programming framework. Together the ideas behind OO are said to be so powerful they create a Paradigm shift in programming.

The exact definitions of these have some variation depending on point of view. In particular, languages with static typing often have slightly different view of OO than languages with dynamic typing, caused by focus on compile-time vs. run-time properties of the programs.

Notes: Abstraction is important to but not unique to OOP. ReusabilityIn computer science and software engineering, reusability is the likelihood a segment of structured code can be used again to add new functionalities with slight or no modification. Reusable code reduces implementation time, increases the likelihood that is a benefit often attributed to OOP.

OOP is often called a paradigmFor alternative meanings see Paradigm (disambiguation). From the late 1800s the word paradigm refers to a thought pattern in any scientific disciplines or other epistemological context. Initially the word was specific to grammar: the 1900 Merriam-Webster rather than a style or type of programming to emphasize the point that OOP can change the way software is developed, by changing the way that programmerIn computing, a programmer is someone who does computer programming and develops computer software. A programmer can be one who develops and maintains software on a large mainframe system or one who develops software primarily for use on personal computers and software engineers think about software.

The Paradigm of OOP is essentially not that of programming, but one of design, a system is designed by defining the objects that will exist in that system, the code which actually does the work is irrelevant to the object, or the people using the object due to encapsulation. The challenge in OOP therefore is of designing a sane object system.


1 Basics of object-oriented programming

The fundamental principle of object-oriented programming is that a computer program is composed of a collection of individual units, or objects which can function like sub-programs. To make the overall computationComputation Discrete mathematics Computation can be defined as finding a solution to a problem from given inputs by means of an algorithm. This is what the theory of computation a subfield of computer science and mathematics, deals with. For thousands of happen, each object is capable of receiving messageMessage in its most general meaning is the object of communication. Depending on the context, the term may apply to both the information contents and its actual presentation. In the communications discipline, a message is information which is sent from as, processing data, and sending messages to other objects. In short, the objects can interact through their own functions (or methods) and their own data.

In this way, messages can be handled, as appropriate, by one chunk of code or by many in a seamless way. It is claimed that this gives more flexibility over simple step-by-step programming, called imperative programming or structured programming in the field of computer science.

Proponents of OOP also claim that OOP is more intuitive and that it is easier to learn, for those new to computer programming, than previous approaches. In OOP, objects are simple, self contained and easily identifiable. This modularity allows the program parts to correspond to real aspects of the problem and thereby to model the real world. Object-oriented programming often begins from a written statement of the problem situation. Then by a process of inserting objects or variables for nouns, methods for verbs and attributes for adjectives, a good start is made on a framework for a program that models, and deals with, that situation. This allows one to learn how to program in object-oriented languages.

However, it is recognized that OOP does not necessarily mean lack of complexity. Meta class programming (see Meta class) for example is a demanding skill, and OOP programs can have a complex web of shared or distinct responsibilities, attributes and methods. It can be challenging to distribute responsibility over objects, or classes—one of many popular implementation scheme s.

Despite this, there is general recognition that the OOP approach is often simpler to develop and to maintain, lending itself to more intuitive analysis, coding, and understanding of complex situations and procedures.

Objective verification of such benefits beyond narrow niches is elusive. It is often heavily debated whether the benefits of OOP are based on universal truths or based on a fit to human psychology. "Would aliens prefer OOP?" is sometimes used as a thought-provoking question.





Non User