Category: 

What Is an Object Type?

Article Details
  • Written By: Jessica Reed
  • Edited By: Heather Bailey
  • Images By: .shock, ビッグアップジャパン
  • Last Modified Date: 20 August 2016
  • Copyright Protected:
    2003-2016
    Conjecture Corporation
  • Print this Article
Free Widgets for your Site/Blog
The U.S. Coast Guard led the evacuation of more than 500,000 people from Lower Manhattan on 11 September 2001.  more...

September 27 ,  1940 :  The World War II Axis powers formed with the signing of the Tripartite Pact.  more...

In computer science, an object type is any item in a computer program that can be altered or changed in some way by the computer program. Object types are a subclass of data types. Data types simply refer to the type of information represented by each item. An object type often has a specific set of attributes that can be changed to different values. In object-oriented programming, an object type refers to a specific item built from a class — the set of rules that acts as guidelines for building new objects.

To envision an object, it's best to imagine building a house. Computer programming languages, such as the Java or C++, are the tools used to build the house. A set of rules and guidelines, often known as a class, show what types of houses can be built from a program. Object types are like these metaphorical houses.

If a programmer wants to build a house with two doors and two windows, he can input those values and create an object. This new object follows the rules set out by its class, but looks at the computer program's specifications for its characteristics such as number of doors and windows. A second programmer might build an object from the same class but set a different number of doors and windows.

Ad

The house metaphor translates into the virtual world of computer programming because an object type must follow certain guidelines to function, just as a house must be assembled according to a blueprint. Object-oriented programming relies heavily on object types to create new programs while using the smallest amount of required code. This lowers the chance of errors in the code and speeds up the process of creating a program from scratch.

Using objects in object-oriented programming has a distinct advantage over other programming types. The guidelines for each object are already determined. All the programmer has to do is decide what object type he wishes to use and then set any special attributes he wants that object type to have.

Object types are the key to making any computer program run. Each one serves a specific function, such as retrieving data from a server or reacting to input typed by the user, and creating multiple objects that work together is what makes a piece of software run. The computer programmer must understand how the object works and what variables to assign it. Then the program code can run behind the scenes while the user can use an easy-to-understand interface to interact with the program.

Ad

You might also Like

Recommended

Discuss this Article

Post your comments

Post Anonymously

Login

username
password
forgot password?

Register

username
password
confirm
email