Software architecture for two similar classes which require different input parameters for the same method
- by I Like to Code
I am writing code to simulate a supply chain.
The supply chain can be simulated in either
an intermediate stocking or a cross-docking configuration.
So, I wrote two simulator objects IstockSimulator and XdockSimulator.
Since the two objects share certain behaviors
(e.g. making shipments, demand arriving),
I wrote an abstract simulator object…