Sign In | Subscribe

Enter your Sign on user name and password.

Forgot password?
  • Follow us on:
Start learning today, and be successful in your academic & professional career. Start Today!
Loading video...
This is a quick preview of the lesson. For full access, please Log In or Sign up.
For more information, please see full course syllabus of Introduction to Java
  • Discussion

  • Study Guides

  • Download Lecture Slides

  • Table of Contents

  • Related Services

Lecture Comments (9)

1 answer

Last reply by: Fancong Mo
Thu Apr 14, 2016 11:46 AM

Post by Acme Wang on March 15, 2016

I still feel very confused about abstract class and interface. Can anybody help me with this? Thanks a lot

0 answers

Post by Rishy G on August 3, 2013


0 answers

Post by M C on July 6, 2013

After submitting my previous questions, I saw that you presented a segment on Interfaces and referenced Abstract Classes within the segment. I also saw your Lecture Summary which included summaries of Abstract Classes and Interfaces.

Both pieces of content helped me to get a "compare and contrast" perspective on abstract classes and interfaces, which was the focus of my last question above. Unless there is any further info that you would like to add to the topic, I now have some info to help me answer the last question.

1 answer

Last reply by: ju lee
Sun May 4, 2014 6:58 PM

Post by M C on July 6, 2013

Re: Abstract Classes:

I don't see the practical value of an abstract class. For example, why would someone want to assign a Shape subclass object like Square to a Shape data type? Please, would you provide some info or perspective about the practical value of abstract classes?

Note: I have an introductory background on Interfaces. In fact, the background material used Shape as the interface, and Square and Circle as implementers of the Shape interface. It seems like there is some overlap of purpose between abstract classes and interfaces. Please, would you provide some compare and contrast info on these two constructs?

0 answers

Post by Arshin Jain on May 6, 2013

I certainly do agree.

0 answers

Post by A Debnath on May 5, 2013

This is very helpful. Thank you!

0 answers

Post by jessica chopra on April 2, 2013

this is so incredibly helpful!!!!!

Inheritance & Polymorphism

  • Inheritance allows one class to extend another class
  • The class doing the extending is called the subclass
  • The class being extended is called the superclass
  • A subclass can override methods it inherits from its superclass
  • An abstract class can be extended but cannot be directly instantiated
  • Polymorphism ensures that the correct method is called for an object disguised as a more generic type
  • An interface only contains headings for methods; a class implements an interface

Inheritance & Polymorphism

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
  • Roadmap 0:42
  • Inheritance 1:14
    • Subclass
    • Superclass
  • Inheritance 3:08
    • Example
  • Inheritance 4:44
    • Subclass Does Not Inherit…
  • Inheritance 7:06
    • To Override a Method
  • Inheritance 8:59
    • Example
  • Class Hierarchies 11:31
    • Multiple Level Hierarchies for Subclass
  • Abstract Classes 14:35
    • Example
  • Polymorphism 20:19
    • Example
  • Interfaces 22:33
  • Interfaces Example 25:13
    • Defines 3 Methods
  • Summary 29:26