13 Replies Latest reply on Jan 18, 2008 10:27 PM by 807601

    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 I don't know how to do this.

      class Video have attributes like title, date of production and director.
      I'm not good in inheritance help please.