Close
Register
Close Window

Show Source |    | About   «  2.1. Exceptions   ::   Contents   ::   2.3. Java Arrays  »

2.2. Polymorphism

2.2.1. Objectives

  • Create and use objects in java

  • Review Java Interfaces and Abstract Classes

  • Review Inheritance and Composition

  • Review Overloading and Overriding

  • Review Reference Variables

  • Trace and program using inheritance

  • Trace and implement equals and toString methods

  • Trace coding examples of polymorphism

  • Design java classes using polymorphism

  • Apply Typecasting

2.2.2. Interactive: Introduction to Object Oriented Programming [9:26]


Video Slides Java OOP Objects.pdf

2.2.3. Checkpoint 1

2.2.5. Programming Practice: Object Oriented Programming

2.2.6. Interactive: Java Inheritance: this, super [11:15]

Follow Along, Practice and Explore

Download to run and explore the java file (see below) from the video on your own in eclipse. You may download the standalone *.java file for this example. To run the standalone *.java file you will need to 1) create a new Eclipse project, then 2) create a package within the project called “example” (the package named at the top of the class MUST match the package the file is placed in within the Eclipse project), and finally 3) download and import the standalone *.java file(s) to the created package.

Video Slides Java OOP Super This.pdf
CS2 Java OOP Example Eclipse Project

2.2.7. Checkpoint 2

2.2.8. Interactive: Java Inheritance: equals(), toString() [14:33]


Video Slides Java OOP Equals ToString .pdf

2.2.9. Java OOP Checkpoint 3

2.2.10. Interactive: Polymorphism Measurable Interface [7:23]

Try It Yourself

Download to run and explore the java file (see below) from the video on your own in eclipse. You may download the standalone *.java file for this example. To run the standalone *.java file you will need to 1) create a new Eclipse project, then 2) create a package within the project called “example” (the package named at the top of the class MUST match the package the file is placed in within the Eclipse project), and finally 3) download and import the standalone *.java file(s) to the created package.


Video Slides JavaOOPPolyMeasurable.pdf

2.2.11. Checkpoint 4

2.2.12. Programming Practice: Polymorphism 1

2.2.13. Interactive: Polymorphism Computer Superclass [12:09]


Video Slides JavaOOPPolyComputer.pdf

2.2.14. Checkpoint 5

2.2.15. Interactive: Polymorphism Integer Example [7:40]


Video Slides JavaOOPPolyInteger.pdf

2.2.16. Checkpoint 6

2.2.17. Programming Practice: Polymorphism 2

   «  2.1. Exceptions   ::   Contents   ::   2.3. Java Arrays  »

nsf
Close Window