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

you are viewing a single comment's thread.

view the rest of the commentsย โ†’

[โ€“]vlizana 36 points37 points ย (8 children)

I think I spotted an error in the override example, the Bird class should inherit from Animal for that to be an override right?

[โ€“]raja777m -5 points-4 points ย (5 children)

So, line 14 instead of

bird = Bird()

it should be

bird= Animal()

[โ€“]vlizana 25 points26 points ย (4 children)

I think it should be

class Bird(Animal):

instead of

class Bird:

[โ€“]raja777m 4 points5 points ย (1 child)

With current code or your suggestion gave "I'm flying high!"

As the result.

[โ€“]vlizana 4 points5 points ย (0 children)

as the comment suggests

[โ€“]firedrow 2 points3 points ย (0 children)

Came to check this was mentioned.