04 2014 档案

摘要:The beginning of this chapter introduced the idea of writing code that can be applied as generally as possible. To do this, we need ways to loosen the... 阅读全文
posted @ 2014-04-19 13:54 wuhn 阅读(462) 评论(0) 推荐(0)
摘要:​Ordinaryclassesandmethodsworkwithspecifictypes: eitherprimitivesorclasstypes.Ifyouarewritingcodethatmightbeusedacrossmoretypes,thisrigiditycanbeoverconstraining.One way that object-oriented languages allow generalization is through polymorphism. You can write (for example) a method that takes a bas 阅读全文
posted @ 2014-04-07 21:58 wuhn 阅读(169) 评论(0) 推荐(0)