in reply to Object creation
This is really a general design question. As such, there are a large number of potential approaches. Without a lot more information, there's no way for anyone to give you any solid advice. So, here's some general guidance instead.
There are some who would argue that everything should be an object. However, in some applications, making an object does not really provide any benefit. For example, if there is no state (or data) in the object, it's not really an object. It's a library.
If you have data and methods that manipulate this data, you might want to think carefully about the suggestion that
... I don't need multiple instances of the class ...
Many times in my career, I've seen problems caused by making the assumption that there could only ever be one of something. Later, when it became clear that there were two, life becomes much more interesting than we wanted.
As with any design question, there are a large number of trade-offs that must be made based on the specifics of your problem.
|
|---|