FACTOID # 28: Austin, Texas has more people than Alaska.
 
 Home   Encyclopedia   Statistics   States A-Z   Flags   Maps   FAQ   About 
   
 
WHAT'S NEW
 

SEARCH ALL

FACTS & STATISTICS    Advanced view

Search encyclopedia, statistics and forums:

 

 

(* = Graphable)

 

 


Encyclopedia > Object (computer science)

In strictly mathematical branches of computer science the term object is used in a purely mathematical sense to refer to any "thing". While this interpretation is useful in the discussion of abstract theory, it is not concrete enough to serve as a primitive datatype in the discussion of more concrete branches (such as programming) that are closer to actual computation and information processing. There, objects are still conceptual entities, but generally correspond directly to a contiguous block of computer memory of a specific size at a specific location. This is because computation and information processing ultimately require a form of computer memory. Objects in this sense are fundamental primitives needed to accurately define concepts such as references, variables, and name binding. This is why the rest of this article will focus on the concrete interpretation of object rather than the abstract one. Mathematics is commonly defined as the study of patterns of structure, change, and space; more informally, one might say it is the study of figures and numbers. Mathematical knowledge is constantly growing, through research and application, but mathematics itself is not usually considered a natural science. ... Wikibooks Wikiversity has more about this subject: School of Computer Science Open Directory Project: Computer Science Downloadable Science and Computer Science books Collection of Computer Science Bibliographies Belief that title science in computer science is inappropriate Categories: | ... In computer science, primitive types, as distinct from composite types - are datatypes provided by a programming language as basic building blocks. ... In computer science, a datatype (often simply a type) is a name or label for a set of values and some operations which one can perform on that set of values. ... Computer programming (often simply programming) is the craft of implementing one or more interrelated abstract algorithms using a particular programming language to produce a concrete computer program. ... In general, information processing is the changing (processing) of information in any manner detectable by an observer. ... The terms storage (U.K.) or memory (U.S.) refer to the parts of a digital computer that retain physical state (data) for some interval of time, possibly even after electrical power to the computer is turned off. ... This article discusses a general notion of reference in computing. ... In computer science and mathematics, a variable is a symbol denoting a quantity or symbolic representation. ... In programming languages, name binding refers to the association of values with identifiers. ...


Note that although a block of computer memory can appear contiguous on one level of abstraction and incontiguous on another, the important thing is that it appears contiguous to the program that treats it as an object. That is, as far as the program is concerned the object must be free of internal references, because otherwise it is no longer a primitive. In other words, object's private storage details must not be exposed to clients of the object, and must be able to change without changes to client code.


Objects exist only within contexts that are aware of them; a piece of computer memory only holds an object if a program treats it as such (for example by reserving it for exclusive use by specific procedures and/or associating a data type with it). Thus, the lifetime of an object is the time during which it is treated as an object. This is why they are still conceptual entities, despite their physical presence in computer memory. On computer science, a datatype (often simply type) is a name or label for a set of values and some operations which can be performed on that set of values. ...


In other words, abstract concepts that do not occupy memory space at runtime are, according to the definition, not objects; e.g., design patterns exhibited by a set of classes, data types in statically typed programs. In software engineering, a design pattern is a general solution to a common problem in software design. ... On computer science, a datatype (often simply type) is a name or label for a set of values and some operations which can be performed on that set of values. ...


To emphasize that an object actually contains meaningful data, a term data object is sometimes used to refer to such an object.


Objects in Object-Oriented Programming

In Object-Oriented Programming (OOP), an instance of a program (i.e. a program running in a computer) is treated as a dynamic set of interacting objects. Objects in OOP extend the more general notion of objects described above to include a very specific kind of typing, which among other things allows for: In computer science, object-oriented programming, OOP for short, is a computer programming paradigm. ... In computer science, a datatype (often simply a type) is a name or label for a set of values and some operations which one can perform on that set of values. ...

  1. data members that represent the data associated with the object.
  2. methods that access the data members in predefined ways.

In the case of most objects, one can access the data members only through the method members, making it easy to guarantee that the data will always remain in a well-defined state (class invariants will be enforced). Some languages do not make distinctions between data members and methods. Used mainly in object-oriented programming, the term method refers to a piece of code that is exclusively associated either with a class (called class methods or static methods) or with an object (called instance methods). ... This article is about class invariants in computer science; for use of the term in mathematics, see equivalence class and invariant. ...


In a language where each object is created from a class, an object is called an instance of that class. If each object has a type, two objects with the same class would have the same datatype. Creating an instance of a class is sometimes referred to as instantiating the class. In computer science, a datatype (often simply a type) is a name or label for a set of values and some operations which one can perform on that set of values. ... In computer science, the object lifetime (or life cycle) of an object in object-oriented programming is the time between an objects creation (also known as instantiation or construction) till the object is no longer used, and is destructed or freed. ...


A real-world example of an object would be "my dog", which is an instance of a type (a class) called "dog", which is a subclass of a class "animal". In the case of a polymorphic object, some details of its type can be selectively ignored, for example a "dog" object could be used by a function looking for an "animal". So could a "cat", because it too belongs to the class of "animal". While being accessed as an "animal", some member attributes of a "dog" or "cat" would remain unavailable, such as the "tail" attribute, because not all animals have tails. In object-oriented programming, an instance is an object that belongs to a class. ... In computer science, a datatype (often simply a type) is a name or label for a set of values and some operations which one can perform on that set of values. ... In, object-oriented programming, a class consists of a description of a collection of encapsulated instance variables and methods, possibly with implementation of those types together with a constructor function that can be used to create objects of the class. ... In object-oriented programming, subclass is a class that is derived from another class or classes. ... In computer science, polymorphism means allowing a single definition to be used with different types of data (specifically, different classes of objects). ...


Three properties characterize objects:

  1. identity - the property of an object that distinguishes it from other objects
  2. state - describes the data stored in the object
  3. behaviour - describes the methods in the object's interface by which the object can be used

Some terms for specialized kinds of objects include: An identity in object-oriented programming, object-oriented design and object-oriented analysis describes the property of objects that the object can be distinguished from other objects. ... Behavior or behaviour refers to the actions or reactions of an object or organism, usually in relation to the environment. ... An interface defines the communication boundary between separate computer components. ...

  • Singleton object - An object that is the only instance of its class during the lifetime of the program.
  • Functor (function object) - an object with a single method (in C++, this method would be the function operator, "operator()") that acts much like a function (like a C/C++ pointer to a function).
  • Immutable object - an object set up with a fixed state at creation time and which does not vary afterward.
  • First-class object - an object that can be used without restriction.
  • Container object - an object that can contain other objects.
  • Factory object - an object whose purpose is to create other objects.
  • Metaobject - an object from which other objects can be created (Compare with class, which is not necessarily an object)
  • Prototype - a specialized metaobject from which other objects can be created by copying
  • God object is an object that knows too much or does too much. The God object is an example of an anti-pattern.

In computer science, the singleton design pattern is designed to restrict instantiation of a class to one (or a few) objects. ... A function object, often called a functor, is a computer programming construct allowing an object to be invoked or called as if it were an ordinary function, usually with the same syntax. ... In computer science, an immutable object, as opposed to a mutable object, is a kind of object whose internal states cannot be modified after it is created. ... In computing, a first-class object (also -value, -entity, -citizen), in the context of a particular programming language, is an entity which can be used in programs without restriction (when compared to other kinds of objects in the same language). ... A container object contains other objects in such a way the objects can be stored or removed at run time, as opposed to an object with composition whose members are fixed at compiler time. ... In object-oriented computer programming, a factory object is an object for creating other objects. ... In computer science, a metaobject or meta-object is any entity that manipulates, creates, describes, or implements other objects. ... In, object-oriented programming, a class consists of a description of a collection of encapsulated instance variables and methods, possibly with implementation of those types together with a constructor function that can be used to create objects of the class. ... Prototype-based programming is a style of object-oriented programming in which classes are not present, and behavior reuse (known as inheritance in class-based languages) is accomplished by cloning existing objects which serve as prototypes for the new ones. ... In object-oriented programming, a God object is an object that knows too much or does too much. ... Anti-patterns, also referred to as pitfalls, are classes of commonly-reinvented bad solutions to problems. ...

See also


  Results from FactBites:
 
Object (computer science) - Wikipedia, the free encyclopedia (910 words)
There, objects are still conceptual entities, but generally correspond directly to a contiguous block of computer memory of a specific size at a specific location.
Objects exist only within contexts that are aware of them; a piece of computer memory only holds an object if a program treats it as such (for example by reserving it for exclusive use by specific procedures and/or associating a data type with it).
A real-world example of an object would be "my dog", which is an instance of a type (a class) called "dog", which is a subclass of a class "animal".
  More results at FactBites »

 
 

COMMENTARY     


Share your thoughts, questions and commentary here
Your name
Your comments

Want to know more?
Search encyclopedia, statistics and forums:

 


Press Releases |  Feeds | Contact
The Wikipedia article included on this page is licensed under the GFDL.
Images may be subject to relevant owners' copyright.
All other elements are (c) copyright NationMaster.com 2003-5. All Rights Reserved.
Usage implies agreement with terms, 1022, m