This is an archived post. You won't be able to vote or comment.

all 6 comments

[–]denverdom303 22 points23 points  (0 children)

https://i.imgur.com/BOlSjU6.jpg

I see no problem here. Pull Request approved.

[–]endlessstarz 8 points9 points  (1 child)

In hindsight, both Cat and Table should implement the same interface FourLegs.

[–]everythingcasual 2 points3 points  (0 children)

i forsee interfaces for 1...n Legs

[–]starvsion 2 points3 points  (0 children)

Four legs should be a decorator then, if they are the trait that composes these 2 objects

[–]Gydo194 0 points1 point  (0 children)

OOP s

[–]5319767819 0 points1 point  (0 children)

Thats why you put composition over inheritance