<quote ref =
http://java.sun.com/docs/glossary.html#O>
"object
The principal building blocks of object-oriented programs. Each object is
a
programming unit consisting of data (instance variables) and functionality
(instance methods). See also class."
</quote>
It talks about methods not member functions.
[...]
/////////////////////////////////////////////////////////////////////////////////////////
dam indenting again
//////////////////////////////////////////////////////////////////////////////////////////
That to me is an ignorant reply. A method is generally accepted to mean the
same thing as a member function(nonstatic respectively implied)
One above and here's another, there are hundreds if not thousands:
http://en.wikipedia.org/wiki/Object-oriented_programming
Now that is a good article of how contradicting and dim the views
about OOP are. I try to pick a quote there:
<quote>
By contrast, the object-oriented approach encourages the programmer to
place data where it is not directly accessible by the rest of the
program. Instead the data is accessed by calling specially written
'functions', commonly called methods, which are either bundled in with
the data or inherited from "class objects" and act as the
intermediaries for retrieving or modifying that data.
</quote>
Yes, so in C++ we have member functions inherited from class instead
of methods bundled in with the data. Class is type. There are no
reflection in C++ and no "class objects" in C++. Instead one can get
some sort of typeid that is a dim implementation-specific thing or
mess with templates to attach traits to types. Still that "member
function" of C++ is close enough to "method" of OOP to call it "OOP
support".
///////////////////////////////////////////////////////////////////////////////////////////////////////
I don't see what you are trying to state here. I understand that text on OOP
perfectly; It describes the concept of data protection and accessor
functions.
Why is it contradicting and dim?
When you speak of methods "bundled" with objects , this is an OOP concept.
If the programming language supports OOP then it has mechanisms which
support this concept, it doesn't really matter what the underlying technical
implementations are.
The C++ language is defined in such a way that if a class declares a
nonstatic method then this method will be available as a member of an
object(instance of the class).
Note: deliberate use of method here to emphasise the association with OOP.
The C++ standard cannot fully define the mechanisms because it chooses to
leave this up to the implementation, for a good reason. If the C++ standard
was to try and define this for every possible and future computer system ,
it would need to be rewritten before it was drafted for comments.
////////////////////////////////////////////////////////////////////////////////////////////////////////////////