Sample 04

 

This is a menu-driven, console program that uses polymorphism to maintain order information for a restaurant. The application source file contains the definition of a class hierarchy consisting of an abstract FastFood class that is the superclass of two more specific classes, Chili and Pizza. The App class constructs and uses an array of FastFood object references to manipulate Chili and Pizza objects.

To run the program, you must be familiar with how to run Java sample code using a "test" project. If you already have a test project, copy and paste the source statements of this Sample04.txt file into the App.java source file of your test project. Then, re-build the test project and launch its App class.