Hands-on practice for this lecture. Work through the exercises and quizzes to reinforce what you've learned.
Exercise 1 of 1
Solve the riddle of private attributes in inheritance. Do they really get passed down if you can't see them?
Do private attributes of a Parent class occupy space in the memory of a Child object?
If a Parent has a 4-byte private 'id' and the Child adds a 4-byte 'score', how big is the Child object?
ðŸ•µï¸ The 16-Byte Mystery: Visibility and Memory are two different things. A child inherits the whole body of the parent, including the private parts it can't see.