Agile by name, but not by nature
new-bamboo.co.uk1 pointsby FuzzyDunlop0 comments
class TwoBaconRashersInsideTwoSlicesOfBreadFactory {
/* Make a sandwich
* <p>
* Construct a foodstuff consisting of two slices
* of bread with two slices of bacon.
* @return TwoBaconRashersInsideTwoSlicesOfBread a sandwich
*/
Public TwoBaconRashersInsideTwoSlicesOfBread getSandwich () {
BaconRasherFactory pig = new BaconRasherFactory();
BaconRasherInstance bacon1 = pig.getBaconRasher();
BaconRasherInstance bacon2 = pig.getBaconRasher();
SliceOfBreadFactory loaf = new SliceOfBreadFactory();
SliceOfBread bread1 = loaf.getSliceOfBread();
SliceOfBread bread2 = loaf.getSliceOfBread();
return new TwoBaconRashersInsideTwoSlicesOfBread(bread1, bacon1, bacon2, bread2);
}
Or something... trying to do Enterprise Java is hard.
It's silly.