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

Follow Along and Engage

Download the slides corresponding to the video. Take notes on them as you watch the video, practice drawing diagrams yourself!

JavaOOPObjects.pdf

2.2.3. Checkpoint 1

2.2.4. Interactive: Java UML Diagrams

Follow Along and Engage

Download the slides corresponding to the video. Take notes on them as you watch the video, practice drawing diagrams yourself!

JavaOOPUML.pdf
UML Diagram from the example in the video

2.2.5. Programming Practice: Object Oriented Programming

2.2.6. Interactive: Java Inheritance: this, super

Follow Along, Practice and Explore

Download to run and explore the corresponding project from the video on your own in eclipse. The project CS2-Support is required for the sample project above. It is also used in your course projects. To download the CS2-Support you must first complete the configuration steps for your first lab. You will then be able to download it via eclipse using the blue down arrow icon or using the Project Menu and selecting “Download Assignment…”

Video Slides Java OOP Super This.pdf
exJavaOOP.zip

2.2.7. Checkpoint 2

2.2.8. Interactive: Java Inheritance: equals(), toString()

Follow Along and Engage

Download the slides corresponding to the video. Take notes on them as you watch the video, practice drawing diagrams yourself!

JavaOOPInheritenceEqualsToString.pdf

2.2.9. Checkpoint 3

2.2.10. Interactive: Polymorphism Measurable Interface

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

Follow Along and Engage

Download the slides corresponding to the video. Take notes on them as you watch the video, practice drawing diagrams yourself!

JavaOOPPolyComputer.pdf

2.2.14. Checkpoint 5

2.2.15. Interactive: Polymorphism Integer Example

Follow Along and Engage

Download the slides corresponding to the video. Take notes on them as you watch the video, practice drawing diagrams yourself!

JavaOOPPolyInteger.pdf

2.2.16. Programming Practice: Polymorphism 2

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

nsf
Close Window