Value of an object?

Hello!
It says i na textbook:

"A variable of a class type is called an OBJECT."

But, also:

"The VALUE of a variable of a class type is called an OBJECT."


Well, if we have a class BOX
Objects box1, box2 and box3

and atribute members color and weight,

what is the value of the object box1, box2, and box3???

I supposed, value of the first object would be f.e. color=blue, weight= 100 kg (menaning, BOTH atributes, but in that case, that VALUSE is a little bit ...complicated type?

Please, am I right?

Many thanks!

A variable is an object. The value of a variable is the data contained in the object.

With class types, one usually is more interested in the behavior than the "value" of the object.
Hello, cire!!!


The value of a variable is the data contained in the object.


So, it means, values of all data members of an object make together the value of the object. Right that is what I wanted to be sure.

MANY THANKS!!!
Topic archived. No new replies allowed.