0
$\begingroup$

Grady Booch in Object-Oriented Analysis and Design with Applications says:

The state of an object encompasses all of the (usually static) properties of the object plus the current (usually dynamic) values of each of these properties ...

Then:

Another property of a vending machine is that it can accept money. This is a static (i.e., fixed) property, meaning that it is an essential characteristic of a vending machine.

Then:

All properties have some value. This value might be a simple quantity, or it might denote another object.

I am in doubt in about "the ability of accepting money" is a real property. Instead it seems it describes a behavior. Also Grady Booch says "All properties have some value."; but what is the value of "the ability of accepting money"?

$\endgroup$
3
  • $\begingroup$ (What if the "property" was characterised as currently accepting money?) $\endgroup$
    – greybeard
    Aug 24 at 6:59
  • $\begingroup$ @greybeard Please add more details. I did not understand your opinion. $\endgroup$ Aug 24 at 7:06
  • $\begingroup$ How much difference would the wording used to characterise a "property" make? While the ability of accepting money looks a prerequisite for commercial vending machines, "entry slots" may be welded shut/vandalised, controls unwilling to accept money when out of supplies, a display might show not accepting coins (or whatever "electronic" means of payment) for reasons unspecified. If your problem is in this domain, give an example of a (characterisation of a) property you'd accept in your post. Or do you think properties need to be mutable? $\endgroup$
    – greybeard
    Aug 24 at 9:21
0
$\begingroup$

He apparently means to say that the existence of a particular property is usually common to every instance of a class (static, in that sense), while its value is not.

For example, time_of_birth is a property common to all Persons, while its value is not.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.