oop - What design pattern is simple inheritance in Java? -


i've read concepts in oop (yes, i'm noob) , 1 of concepts read design patterns. i've checked of patterns , question struck me:

what's name or term of such pattern inherit/extend abstract class or class such matter? or not design pattern?

e.g. abstract class drink, class juice extends drink, class soda extends drink etc.

as other answers have said, inheritance not design pattern: inheritance.

are asking whether there design pattern uses single class hierarchy, using inheritance , not composition? there such design pattern: template method pattern.


Comments

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -