Tag Archives: factory

Factory Design Pattern

Let say we have some Pet domain classes. Pet is an interface which is implemented by Cat and Bird. Nothing more complicated than that for now. Of course you can always say: 1 Pet giacomo = new Cat(); This does indeed work. But let’s say you just want a Pet and you don’t really care [...]

Posted in Design Patterns | Also tagged , , | 1 Response