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

• ## Related Services

 1 answerLast reply by: Maury HillstromMon Apr 24, 2017 5:18 PMPost by Emanuel Fonseca on April 24 at 02:45:11 AMOverriding is a part of Polymorphism correct? Im looking for information on overriding the toString method? 0 answersPost by Maury Hillstrom on October 2, 2015Hi Timothy, it's basic geometry.  You need the rectangle height & width (x, y) to calculate area, but for a circle or sphere, all you need is radius. 0 answersPost by Timothy White on October 2, 2015Why do you need x and y position coordinates if you just need area and volume (and are not actually drawing the shape)? Also, why do you have no z-coordinate for 3-dimensional shapes?

### Polymorphism

• Polymorphism allows a class to take on multiple forms
• Polymorphism uses Abstract Classes to leave some methods undefined
• These undefined methods will have their arguments defined at run-time rather than at compile-time, allowing for flexibility
• A Superclass method that is declared “final” cannot be overridden in an extended subclass

### 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
• What is Polymorphism? 0:08
• Definition of Polymorphism
• Polymorphism in Programming 1:10
• Superclass
• Subclass
• Variable
• Method
• Polymorphism in Programming 3:46
• Superclass
• Subclass
• Variable
• Method
• Abstract Classes vs. Concrete Classes 6:31
• Abstract Classes
• Abstract Class Polymorphism Example 9:19
• Abstract Superclass
• Concrete Subclasses
• 'Final' Keyword for Superclass Methods 13:49
• 'Final' Keyword
• Example
• Example 1: Program to Demonstrate Basic Polymorphism 16:25
• Example 2: Program to Demonstrate Polymorphism with Multiple Subclasses 18:35
• Example 3: Program Tests Shape Hierarchy 25:12
• Example 4: Definition of Class Shape 27:17
• Example 5: Definition of Class Two Dimensional Shape 28:31
• Example 6: Definition of Class Three Dimensional Shape 29:29
• Example 7: Definition of Class Sphere 33:45