My ma always said my straight shootin' was my very best attribute. Well...ok, that's not entirely true...but it does illustrate something about what 'attribute' means. For people, an attribute is a quality they 'have'. For objects, an attribute is something that it 'is'.
The great thing about attributes in object oriented programming is that they allow you to check the functions that are taking place. If an object 'is' something, we can check for that, and ensure it is working properly. This is particularly important in object oriented programming, because the data controls the software to a great extent (where as in procedural programming the data has no control at all).
Attributes are an aspect of object
oriented programming that are given a great deal of emphasis in c++
and some other object oriented languages. Each object oriented program uses a different method for determining attributes. (For instance,
the c++ compiler deduces these attributes from implicit or explicit
declarations in the source code).
1) Different object oriented programs use a different method for determining attributes.
2) Attributes allow checking of functions to take place.
3) The are two prime attributes: a) Storage Class b) Type
Here is a practical example
You know that pages are the basic documents of the World Wide Web. They are written in an evolving language called HTML (Hypertext Mark-up Language). An HTML page contains text and HTML tags — embedded commands that supply information about the page's structure, appearance, and contents.
Some HTML tags build a description
of the structure of the elements on a page, such as tables and forms, which
are made up of many elements. Web browsers (programs that display pages) use
this information to determine how to display the page elements in relation
to each other. For example, the HTML tags that describe a table specify the
number of rows it has, the number of cells in a row, and so forth.
VISIT AN AREA IN OzEdweb