Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
Kristofer Doman
18,307 PointsWouldn't Car just conform to protocol Vehicle?
I mean, I'm sure you could do it either way, but it wouldn't conform to numberOfSeats then.
If you just did protocol Car: Vehicle instead, wouldn't it conform to all 3?
2 Answers
J Kim
15,218 PointsI think it should've been. It's a rather poor example / design.
Alp Eren Can
25,230 PointsAs you've said it, it could go either way. I think Pasan was just trying to make room for the motorcycle example that it can conform to Vehicle protocol while Car conforms to Breakable and Drivable.
J Kim
15,218 PointsStill that is a bad design. Motorcycle and Car should both conform to Vehicle protocol since Vehicle protocol already belongs to Breakable and Drivable.
There is no rational explanation for why Car should conform to both Breakable and Drivable directly when Car would clearly conform to Vehicle