What's the different between state and properties in a class?
In an OOP class:
class Person {
private doingWhat = undefined
...
public eat() {
this.doingWhat = eating
}
public sleep() {
this.doingWhat = sleeping
}
public run() {
this.doingWhat = running
}
}
in this class I use the property doingWhat
represent the state of the Person instance.
So I have a question about it, whether the property equals to the state in an OPP class, they are the same thing?