Reputation: 3376
I have a class named 'Material'
The class itself represents an effect, but instances of that class represent a material.
Should I call the class 'Effect' or 'Material' ?
Upvotes: 0
Views: 67
Reputation: 110071
Apply the Single Responsibility Principle (SRP) and make two classes for two represented concerns.
Upvotes: 1
Reputation: 492
What environment are you working in?
I'd keep both class and instances of classes representative of the material and employ a subclass for effect - particularly if the effect is coupled tightly with the material as is often the case. This will allow for better management as your effect arrays become more sophisticated.
Upvotes: 1