This has been flagged as spam show
This means we need to add more if else conditions in the FactoryClass if we try to create a new instance of another new class type.
else if (invoiceType==4){ objnew = new NewClass();
}
What is the best way to avoid this situations?
aswininayak12 8 months ago
This means we need to add more if else conditions in the FactoryClass if we try to create a new instance of another new class type.
What is the best way to avoid this situations?
A key point is that the Factory class is a singleton. Also, it is worth noting that refactoring breaks existing clients.
zallecool 9 months ago
Could you please also explain the AbstractFactory pattern? This one is awesome.
chaddhavishal 9 months ago
where can I download the source code?
thanks!
kobac 1 year ago
Clear explanation thanks :)
Peaceguard 1 year ago
This has been flagged as spam show
This means we need to add more if else conditions in the FactoryClass if we try to create a new instance of another new class type.
else if (invoiceType==4){ objnew = new NewClass();
}
What is the best way to avoid this situations?
aswininayak12 8 months ago
This means we need to add more if else conditions in the FactoryClass if we try to create a new instance of another new class type.
else if (invoiceType==4){ objnew = new NewClass();
}
What is the best way to avoid this situations?
aswininayak12 8 months ago
A key point is that the Factory class is a singleton. Also, it is worth noting that refactoring breaks existing clients.
zallecool 9 months ago
Could you please also explain the AbstractFactory pattern? This one is awesome.
chaddhavishal 9 months ago
where can I download the source code?
thanks!
kobac 1 year ago
Clear explanation thanks :)
Peaceguard 1 year ago