OOP

From Wikicliki
Revision as of 03:49, 30 June 2009 by WikiSysop (talk | contribs)

Jump to: navigation, search

Days like these i wish i had a more thorough grounding in maths and physics instead of being a literature student with aspirations of learning programming...

Object Oriented Programming

A class is a programming language construct that is used as a blueprint to create objects.

A class is used to create new instances (objects) by instantiating the class.

Instances of a class share the same set of attributes, yet may differ in what those attributes contain.

The class would list types of such attributes and also define the actions which a instance can perform.

Objects define their interaction with the outside world through the methods that they expose. A method, or instance method, is a subroutine (function) with a special property that it has access to data stored in an object (instance). Methods that manipulate the data of the object and perform tasks are sometimes described as behavior.