あらためてデザインパターンを勉強することにした、その備忘録。 なんとなくわかっていたつもりでいたが、なんとなくだったと実感した。 IS-A と HAS-A と Implements かなり重要。
IS-A (~である)
- 継承している
- 処理を親から子に渡すことができ、プログラムの重複を減らせる
HAS-A (~を持つ)
- プロパティとして設定している
- インターフェースをプロパティの値としてとることで、処理を委譲することができる。
委譲することで柔軟なプログラムを作ることができる。
IMPLEMENTS (実装する)
- インターフェースに対して実処理を実装している
HeadFirstシリーズで勉強し始めたのだが、このトップの画像のDuckから伸びてるBehaviorの線は HAS-A のはずなのに、IS-A になってる・・・。
True, People search for tech app developers near me, various options available to you will depend on your budget, the kind of project you have, and the type of services or skills you require. Eiliana.com is a global freelancing portal where you can hire app developers near me by filtering the location.
返信削除