Start learning today, and be successful in your academic & professional career. Start Today!

• ## Related Services

 1 answerLast reply by: Ismael MartinWed Dec 3, 2014 12:51 AMPost by Ismael Martin on December 3, 2014why is there an 11 in super in class C???what does it do, and why isn't it explained???super(11); 0 answersPost by adel almaraghi on August 7, 2012Yes. some of the details are always left!! 0 answersPost by Bruno Riina on August 1, 2012why instructor does not explain "Subc x = new subc(9);" what is this? why we need it? why it is 9? why not 14?? some of the details are always left out makes it hard to follow through.

### Inheritance

• Inheritance and Composition are two different ways to quickly build multiple classes related to each other
• Inheritance uses an “is-a” relationship like “An eagle is-a bird, or a falcon is-a bird”
• Composition uses a “has-a” relationship like “A bird has-a beak, a bird has wings”
• Composition will use a main class that “calls” other classes to build itself
• Inheritance will use the “extends” keyword to create another class based on the super-class

### Inheritance

Lecture Slides are screen-captured images of important points in the lecture. Students can download and print out these lecture slide images to do practice problems as well as take notes while watching the lecture.

• Intro 0:00
• Composition vs. Inheritance 0:07
• Composition & Example
• Inheritance & Example
• Composition vs. Inheritance 2:04
• Visual Diagram
• Inheritance Class Structure 4:36
• Parent Class
• Child Class
• Purpose of Inheritance
• Method Overriding