I am learning about inheritance and for the most part I understand all the concepts along with polymorphisms. What I don't understand is how these ideas fall into building a real world application. If someone could, please point me to some code examples that embrace inheritance and polymorphisms. I would like to see how they work in a large application/program. Don't point me to a general Dog extends Animal example, I get the concept. I guess I'm just trying to bridge everything together.
Well, one example is probably right under your nose: Java's Swing and AWT APIs. Everything you can see on the screen is a Component. Some Components are Containers (JPanel, JFrame) because they can contain other Components. Other Components represent "widgets" like JButton, JComboBox, JTree, JList... Every one of these objects is very different from the others, but they all have identical methods to set the size, color, font... all inherited from Component. Obviously each Component has to react differently to be told to resize itself (for example). But to tell a Component to resize itself, you can just call setSize(), not matter what subclass of Component it is.