Name: Anonymous 2021-03-07 17:55
Post tips for good code here. I'll start:
Place the if/else cases in a factory object that creates a polymorphic object for each variant. Create the factory in ``main'' and pass it into your app. That will ensure that the if/else chain occurs only once.
Place the if/else cases in a factory object that creates a polymorphic object for each variant. Create the factory in ``main'' and pass it into your app. That will ensure that the if/else chain occurs only once.