What do the two methods inherit when they are in different classes?


#1

Hi,
The link to the lesson:https://www.codecademy.com/courses/learn-python/lessons/introduction-to-classes/exercises/warning-here-be-dragons?action=resume_content_item
In the code editor,the methods display_cart and display_order_history are in different classes, so what do they inherit.?

Every answer will be appreciated
THANK YOU


#2

ReturningCustomer is the child class, it inherits all methods from parent.


#3

From a standpoint of access, the derived class can access all the methods of the super class, but the super class cannot access the methods of the derived class.


#4

So Returning Customer is the derived class and Customer is the super class.


#5

yes, you can also checkout the wiki:

https://docs.python.org/2/tutorial/classes.html#inheritance

for more information.