


	/**
	  *@author CS Dept 239
	  *@revisor Jeremy Halterman
	  *@version 1.1
	  *@date 9-17-08
	  *A main method for using the Thing class shows each object's instance
	  *variables and each object's use of the class's static variable*/
//	public Class
	public class ThingDriver2
	{

		/**
		 * @param args  mein method input
		 */
		public static void main(String[] args) 
		
		{
		//declared variables for each instance object
		int x1,x2,x3;
		int y1,y2,y3;
		int z1,z2,z3;
		
		//Object instantiation
		Thing one;
		//assigning memory addresses to a Thing object
		one = new Thing();
		//uses static method to change instance of z to 15
		Thing.putThing(15);
		
	
		//assigns this class's object instance of x the value of z
		x1 = one.getX();
		System.out.println("This object One's value of x: " + x1);
		
        //assigns this class's object instance of y the value of z
		y1 = one.getY();
		System.out.println("This object One's value of y: " + y1);
		
		//assigns this class's object instance of z the modified value of z
		//z being 15
		
		z1 = one.getZ();
		
		//displays the change of z, being different from initial static value of 23
		System.out.println("This object One's value of z: " + z1);
		System.out.println();
	   
		
		/*Creates a second object of Class Thing*/
		Thing two;
		two = new Thing();
		
		/*uses static method to change the static variable of the class z
		 *assigns it the value 27*/
		Thing.putThing(27);
		
        //assigns this class's object instance of x the value of z
		x2 = two.getX();
		System.out.println("This object Two's value of x: " + x2);
		
        //assigns this class's object instance of y the value of z
		y2 = two.getY();
		System.out.println("This object Two's value of y: " + y2);
		
        //assigns this class's object instance of z the modified value of z
		//z being 27 from static method
		z2 = two.getZ();
		
		//displays the change of z, being different from initial static value of 15
		System.out.println("This object Two's value of z: " + z2);
	    System.out.println();
	   
	    
	    /*Creates a third object of Class Thing*/
		Thing three;
		//assigns an object to the memory address
		three = new Thing();
		
		/*uses static method to change the static variable of the class z
		 *assigns it the value 35*/
		Thing.putThing(35);
		
        //assigns this class's object instance of x the value of z
		x3 = three.getX();
		System.out.println("This object Three's value of x: " + x3);
		
        //assigns this class's object instance of y the value of z
		y3 = three.getY();
		System.out.println("This object Three's value of y: " + y3);
		
        //assigns this class's object instance of z the modified value of z
		//z being 35 from static method
		z3 = three.getZ();
		//displays the change of z, being different from initial static value of 15
		System.out.println("This object Three's value of z: " + z3);
	    System.out.println();
		
		
		}//end main

	}//end class


