avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From blorit...@apache.org
Subject cvs commit: avalon-sandbox/tweety/examples/tutorial/src/java/avalon/tutorial Cartoon.java CartoonCage.java
Date Wed, 05 Mar 2003 03:51:19 GMT
bloritsch    2003/03/04 19:51:19

  Modified:    tweety/examples/tutorial/src/java/avalon/tutorial
                        Cartoon.java CartoonCage.java
  Log:
  make it compile
  
  Revision  Changes    Path
  1.2       +7 -5      avalon-sandbox/tweety/examples/tutorial/src/java/avalon/tutorial/Cartoon.java
  
  Index: Cartoon.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/tweety/examples/tutorial/src/java/avalon/tutorial/Cartoon.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Cartoon.java	27 Oct 2002 19:07:52 -0000	1.1
  +++ Cartoon.java	5 Mar 2003 03:51:18 -0000	1.2
  @@ -1,6 +1,8 @@
   package avalon.tutorial;
   
   import java.util.ArrayList;
  +import java.util.Collections;
  +import java.util.Iterator;
   
   public class Cartoon
   {
  @@ -10,7 +12,7 @@
   	private ArrayList m_cats;
   	private ArrayList m_cages;
   	
  -	public CartoonBird( String name )
  +	public Cartoon( String name )
   	{
   		m_name = name;
   		
  @@ -24,7 +26,7 @@
   		Cartoon c = new Cartoon( "AvalonBirdie vs StupidCat" );
   		CartoonBird ab = new CartoonBird( "AvalonBirdie", "I thawt I saw a Stupid Cat!" );
   		CartoonBird ob = new CartoonBird( "OtherBirdie", "I like the mountains, I like the rolling
hills. I like the ..." );
  -		CartoonCat sc = new CartoonBird( "StupidCat", "EJBs to the victory!" );
  +		CartoonCat sc = new CartoonCat( "StupidCat", "EJBs to the victory!" );
   		
   		CartoonCage gc = new CartoonCage( "GoldenCage", "A shiney golden cage" );
   		
  @@ -45,19 +47,19 @@
   		}
   		if( o instanceof CartoonBird )
   		{
  -			CartoonBird c = (CartoonBird)b;
  +			CartoonBird c = (CartoonBird)o;
   			System.out.println( "   Starring the really cool bird :" + c.getName() );
   			return;
   		}
   		if( o instanceof CartoonCat )
   		{
  -			CartoonCat c = (CartoonBird)c;
  +			CartoonCat c = (CartoonCat)o;
   			System.out.println( "   Starring the really mean cat :" + c.getName() );
   			return;
   		}
   		
   		// got ourselves something else
  -		System.out.println( "   Containing the really interesting object :" + c.getName() );
  +		System.out.println( "   Containing the really interesting object :" + o.toString() );
   	}
   	
   	public void setName( String name )
  
  
  
  1.2       +1 -0      avalon-sandbox/tweety/examples/tutorial/src/java/avalon/tutorial/CartoonCage.java
  
  Index: CartoonCage.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/tweety/examples/tutorial/src/java/avalon/tutorial/CartoonCage.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- CartoonCage.java	27 Oct 2002 19:07:52 -0000	1.1
  +++ CartoonCage.java	5 Mar 2003 03:51:18 -0000	1.2
  @@ -2,6 +2,7 @@
   
   import java.util.ArrayList;
   import java.util.Collections;
  +import java.util.Iterator;
   
   public class CartoonCage
   {
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: cvs-unsubscribe@avalon.apache.org
For additional commands, e-mail: cvs-help@avalon.apache.org


Mime
View raw message