package edu.ucsb.cs.jicos.examples.fibonacci; import edu.ucsb.cs.jicos.services.*; import edu.ucsb.cs.jicos.services.tasks.*; final public class F extends Task { int n; public F( int n ) { this.n = n; } public Object execute ( Environment environment ) { if ( n < 2 ) { return new Integer( 1 ); } else { compute( new F( n - 1 ) ); compute( new F( n - 2 ) ); return new AddInteger(); } } }