Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Who does cut the wood? (a meditation on Object Oriented Design) (stackoverflow.com)
2 points by sandeepshetty on Sept 11, 2012 | hide | past | favorite | 1 comment


This is a good example if you also include a Saw class and an Axe class. Saw and Axe implement ICutter and IUsable. The Tree class implements ICuttable. Then Worker class calls ICutter.cut(ICuttable)




Consider applying for YC's Winter 2027 batch! Applications are open till November 2.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: