how to get the child class in inheritance?
if I have a store for renting videos .. and I have Video class (parent) and two (child) classes DVD and Cassete which they are extend the video class.
And the user wants to rent a DVD which is the child, how do I do that? can I write just getDVD() as simple as that or maybe I need to use a keyword like "getinstance of DVD " or something.
class Video have attributes like title, date of production and director.
I'm not good in inheritance :( help please.