A note about the names of your classes:
Note that "inheritance" in terms of object oriented software has a different meaning than inheritance in the biological sense. Calling classes "Parent" and "Child" confuses the object oriented programming meaning of the
word with the biological meaning.
It's very important to understand that subclassing in object oriented programming means that you create a specialized version of the superclass. There is an "is a" relationship between the superclass and the subclass: an instance of the subclass
is an instance of the superclass (with things added to it).
If you call your superclass "Parent" and your subclass "Child", then what you're saying is:
A Child is a Parent, which is obviously false if you think about the meaning of the words "Parent" and "Child".
It's better to use for example the words "Animal" and "Dog" instead of "Parent" and "Child" - a Dog
is an Animal.
There's no such thing as a "parent class" and a "child class" - we call those superclasses and subclasses.