6 ms·
Sorry. It's Java. The GunShotWound has to come from a GunShotWoundFactory.
by phillco 16y ago
Sorry. It's Java. The GunShotWound has to come from a GunShotWoundFactory.
- bcrescimanno 16y agoUnfortunately, GunShotWoundFactory now needs to implement AbstractGunshotWoundFactory so that we can support multiple types of gunshot wounds. Of course, we'll need an AbstractGunshotWound as well and a subclass for each type of gun used. Needless abstractions make my head HURT!
- cheez 16y agoDON'T WORRY GUYS! Dependency injection to the rescue!
- fabjan 16y agoThe WoundFactoryFactory will take care of it.
- cheez 16y agoActually, I'll be honest: I quite like dependency injection. There are a lot of really good things that can be done with Guice. I've written one for C++ here: https://bitbucket.org/cheez/dicpp/wiki/Home https://bitbucket.org/cheez/dicpp/wiki/Home
- bad_user 16y agoOr Python.