Reputation: 373
In designing a class for customer for example would it make sense to use an Enum for CustomerType?
Upvotes: 0
Views: 154
Reputation: 545686
That depends on other constraints. You haven't told us enough about your model. For example, if different types of customers have different types of information associated with them, a class hierarchy will be better suited that an a mere enum.
In other cases, an enum will be fine or might even be preferred (simpler, reduced overhead …).
Upvotes: 3