Sobes.tech
Junior — Middle

Is the property of an object responsible for the number of passengers in a bus?

sobes.tech AI

Answer from AI

An object property is a characteristic or attribute that describes the object. The number of passengers in a bus is a dynamic state that changes over time, not a constant property of the bus.

In an object-oriented approach, the number of passengers would more likely be stored as a field (state variable) of the "Bus" object, reflecting its current state, but it is not an immutable property.

Therefore, the number of passengers is not a property in the classical sense, but a state of the object that can change during the program's execution.

Is the property of an object responsible for the… - sobes.tech