Skip to content

trisckit/PolymorphismExample

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PolymorphismExample

This is my example program demonstrating Polymorphism in Java.

The listings in the textbook were fine, but I feel like using a more basic concept of Food, rather than complex StaffMembers, can better summarize the capabilities and limitations of JUST polymorphism. I highly recommend that you still read through the textbook listings, because they are great examples of how polymorphism may be applied to the concepts of abstract classes and how polymorphism is used in interactions with variables and methods.

To add this to your Eclipse, please make a new Java Project, and create 5 classes with the exact same names as the files in this repository.

Then, just go into each file in this repository, copy the code inside, and paste them into the corresponding class.

The Driver_Food class is supposed to have errors, read through it to find out why!

If you find any other real errors and mistakes, feel free to comment on Facebook and I'll revise the code and commentary.

About

Example Program Demonstrating Java Polymorphism

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published