Skip to main content
edited body
Source Link

Before I comeIn addition to your actual questionanswers already u have,

There is a number of virtual vehicles which have a huge number of properties and states, from type, name, color, to speed, position, etc. A number of users can remote control them, and a huge number of events (both user-initiated and automatic) can change a lot of their states or properties.

One of characteristic of OOP programming is to only keep properties you really need for a specific object,

NOW IF your object has too many properties - you should break your object down further into sub-objects.

Edit

Already mentioned why global objects are bad, I would add one example to it.

You need to do unit testing on a windows form's GUI code, if you use global, you will need to create all of button and it's events for example to create a proper test case...

Before I come to your actual question,

There is a number of virtual vehicles which have a huge number of properties and states, from type, name, color, to speed, position, etc. A number of users can remote control them, and a huge number of events (both user-initiated and automatic) can change a lot of their states or properties.

One of characteristic of OOP programming is to only keep properties you really need for a specific object,

NOW IF your object has too many properties - you should break your object down further into sub-objects.

In addition to answers already u have,

There is a number of virtual vehicles which have a huge number of properties and states, from type, name, color, to speed, position, etc. A number of users can remote control them, and a huge number of events (both user-initiated and automatic) can change a lot of their states or properties.

One of characteristic of OOP programming is to only keep properties you really need for a specific object,

NOW IF your object has too many properties - you should break your object down further into sub-objects.

Edit

Already mentioned why global objects are bad, I would add one example to it.

You need to do unit testing on a windows form's GUI code, if you use global, you will need to create all of button and it's events for example to create a proper test case...

Source Link

Before I come to your actual question,

There is a number of virtual vehicles which have a huge number of properties and states, from type, name, color, to speed, position, etc. A number of users can remote control them, and a huge number of events (both user-initiated and automatic) can change a lot of their states or properties.

One of characteristic of OOP programming is to only keep properties you really need for a specific object,

NOW IF your object has too many properties - you should break your object down further into sub-objects.