/* Author : Michael Robinson Program : multiAccess.java Purpose : This program passes objects of a super-class and its sub- classes to a class that accepts objects of a super-class data type. Updated : September 23rd, 2099 */ public class multiAccess { public static void main( String arg[] ) { //this object takes an argument type polySuper objectBuilder test = new objectBuilder(); //to be used as a parameter in the test object. //notice polyObject is of type and class polySuper polySuper polyObject = new polySuper(); //passing the super-class test.processing( "super", polyObject ); //********************************************* //to be used as a parameter in the test object. //notice sub1Object is of type polySuper //and class sub1, a sub-class polySuper sub1Object = new sub1(); polySuper sub2Object = new sub2(); polySuper sub3Object = new sub3(); //passing the sub-classes test.processing( "sub1", sub1Object ); test.processing( "sub2", sub2Object ); test.processing( "sub3", sub3Object ); }//end public static void main( String arg[] ) }//end public class multiAccess