Created
October 16, 2015 14:35
-
-
Save froilan-miranda/5e63acbf61da3f668637 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Java Lab | |
Type Information | |
Step 1 - Create a base class | |
example: class A | |
Step 2 - Create 3 classes that extend the base class | |
example: class B extends A | |
Step 3 - Write a program that creates 10 random instances of the extended classes and loads them in an List that only accepts instances of the parent class. | |
Step 4 - Go through each object in the list, down cast it to its original type and call a method that object |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment