I have two classes namely classA and classB which both inherit from class1.
Now I want to send a string like “A” based on that I should instantiate class A
My boss asked me to use enum instead of using switch case to write the code.
How do i go about writing this.
You could create a lookup factory
An then in the resolve to get the correct class