Why is composition better than inheritance?

Composition offers better test-ability of a class than Inheritance . If one class consists of another class, you can easily construct a Mock Object representing a composed class for the sake of testing. This privilege is not given by inheritance.

Sizin İçin Seçtik  Reklam ve propaganda arasındaki fark nedir?

Leave a Reply

Your email address will not be published. Required fields are marked *

Why is composition better than inheritance?

Composition offers better test-ability of a class than Inheritance . If one class consists of another class, you can easily construct a Mock Object representing a composed class for the sake of testing. This privilege is not given by inheritance.

Sizin İçin Seçtik  Fiyatlar genel seviyesinde belirli bir zaman süresince sürekli düşüş yaşanması durumunda ortaya çıkan ekonomik sürece ne ad verilir?

Leave a Reply

Your email address will not be published. Required fields are marked *