posted 16 years ago
On page 175, there is an example of Chocolate Boiler class. Something like this:
I didn't understand, what's the problem with this class???
Why should we go for singleton???
These two flags (variables) are not static and so one per instance. So how creating more than one instance can let things go worng? Every instance has separate and it's own copy of these variable. :roll:
Thanks.