Question: In JAVA: Modify the Firm example from this chapter such that it accomploshes its polymorphism using an interface called Payable. The Firm example is below:
In JAVA: Modify the Firm example from this chapter such that it accomploshes its polymorphism using an interface called Payable. The Firm example is below:
//******************************************************************** // Firm.java Author: Lewis/Loftus // // Demonstrates polymorphism via inheritance. //******************************************************************** public class Firm { //----------------------------------------------------------------- // Creates a staff of employees for a firm and pays them. //----------------------------------------------------------------- public static void main (String[] args) { Staff personnel = new Staff(); personnel.payday(); } }
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
