Component design: getting cohesion right
I currently have a set of components named DataValues, ValueParsers, ValueFormatters and ValueValidators. The first one defines an abstract base class DataValue and contains a whole load of implementations. The 3 other components each define in interface similar to their name (minus the “s”), and also contain a bunch of implementations of those. These 3 depend on DataValues. There are no further dependencies.
Have Superclass Contain List of Subclass?
For the GUI of a program, I want it to list several items, all of which are, from a programming side, just subclasses. They can add one of these items to a list. I don’t want to hard-code which subclasses there are. What would be the best way to allow the GUI to know about the subclasses, only having the base class to refer to?
Have Superclass Contain List of Subclass?
For the GUI of a program, I want it to list several items, all of which are, from a programming side, just subclasses. They can add one of these items to a list. I don’t want to hard-code which subclasses there are. What would be the best way to allow the GUI to know about the subclasses, only having the base class to refer to?
Have Superclass Contain List of Subclass?
For the GUI of a program, I want it to list several items, all of which are, from a programming side, just subclasses. They can add one of these items to a list. I don’t want to hard-code which subclasses there are. What would be the best way to allow the GUI to know about the subclasses, only having the base class to refer to?
Creating Set Subclasses or Allowing Outside Configuration
I have a TriggerCaller
and a TriggerAction
class. The Caller “calls” the do()
method on the action, which is set with the TriggerCaller
s setAction()
method. The rest of the program should deal with the Trigger
class, which contains the caller and the action.
Creating Set Subclasses or Allowing Outside Configuration
I have a TriggerCaller
and a TriggerAction
class. The Caller “calls” the do()
method on the action, which is set with the TriggerCaller
s setAction()
method. The rest of the program should deal with the Trigger
class, which contains the caller and the action.
How to deal with requirements and use cases in this kind of situation?
Recently I’ve started to work with object oriented analysis and design and it seemed very interesting to me as a way to get work done better. But I’m still in doubt with one kind of situation. If this is not the correct site to ask about it, sorry for that.
How to avoid peppering the code with IFs [duplicate]
This question already has answers here: Approaches for checking multiple conditions? [duplicate] (3 answers) Closed 11 years ago. I need to add a new payment type to an existing code base. That means that I’m going to have a few methods looking like this: if (old payment type) process old type of payment else process […]
How should I implement “queueing” of approval on my objects?
I have a list of objects that will need to go through an approval process.
How should I implement “queueing” of approval on my objects?
I have a list of objects that will need to go through an approval process.