Source of ConstructorTest.java


  1: // Fig. 9.17: ConstructorTest.java
  2: // Display order in which superclass and subclass constructors are called.
  3: 
  4: public class ConstructorTest 
  5: {
  6:    public static void main( String args[] )
  7:    {
  8:       CommissionEmployee4 employee1 = new CommissionEmployee4( 
  9:          "Bob", "Lewis", "333-33-3333", 5000, .04 );
 10:       
 11:       System.out.println();
 12:       BasePlusCommissionEmployee5 employee2 = 
 13:          new BasePlusCommissionEmployee5( 
 14:          "Lisa", "Jones", "555-55-5555", 2000, .06, 800 );
 15:       
 16:       System.out.println();
 17:       BasePlusCommissionEmployee5 employee3 = 
 18:          new BasePlusCommissionEmployee5( 
 19:          "Mark", "Sands", "888-88-8888", 8000, .15, 2000 );
 20:    } // end main
 21: } // end class ConstructorTest
 22: 
 23: 
 24: /**************************************************************************
 25:  * (C) Copyright 1992-2005 by Deitel & Associates, Inc. and               *
 26:  * Pearson Education, Inc. All Rights Reserved.                           *
 27:  *                                                                        *
 28:  * DISCLAIMER: The authors and publisher of this book have used their     *
 29:  * best efforts in preparing the book. These efforts include the          *
 30:  * development, research, and testing of the theories and programs        *
 31:  * to determine their effectiveness. The authors and publisher make       *
 32:  * no warranty of any kind, expressed or implied, with regard to these    *
 33:  * programs or to the documentation contained in these books. The authors *
 34:  * and publisher shall not be liable in any event for incidental or       *
 35:  * consequential damages in connection with, or arising out of, the       *
 36:  * furnishing, performance, or use of these programs.                     *
 37:  *************************************************************************/