Science Fair Projects Ideas - Object (computer science)

All Science Fair Projects

      

Science Fair Project Encyclopedia for Schools!

  Search    Browse    Forum  Coach    Links    Editor    Help    Tell-a-Friend    Encyclopedia    Dictionary     

Science Fair Project Encyclopedia

For information on any area of science that interests you,
enter a keyword (eg. scientific method, molecule, cloud, carbohydrate etc.).
Or else, you can start by choosing any of the categories below.

Object (computer science)

(Redirected from Object (programming))

An object is a data structure that is unique and separate from other objects, although they are able to interact with other objects.

An object is the central concept in object-oriented programming, and the term object today usually refers to an object in the OOP sense. In OOP, an object consists of two kinds of members:

  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.

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.

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:

  • Singleton object - An object that will only allow itself to be instantiated once 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 that can create other objects.

See also

10-26-2009 08:16:03
The contents of this article is licensed from www.wikipedia.org under the GNU Free Documentation License. Click here to see the transparent copy and copyright details
Science kits, science lessons, science toys, maths toys, hobby kits, science games and books - these are some of many products that can help give your kid an edge in their science fair projects, and develop a tremendous interest in the study of science. When shopping for a science kit or other supplies, make sure that you carefully review the features and quality of the products. Compare prices by going to several online stores. Read product reviews online or refer to magazines.

Start by looking for your science kit review or science toy review. Compare prices but remember, Price $ is not everything. Quality does matter.
Science Fair Coach
What do science fair judges look out for?
ScienceHound
Science Fair Projects for students of all ages
All Science Fair Projects.com Site
All Science Fair Projects Homepage
Search | Browse | Links | From-our-Editor | Books | Help | Contact | Privacy | Disclaimer | Copyright Notice