1 import org.enhydra.shark.api.internal.toolagent.AppParameter; 2 3 import java.lang.Math ; 4 5 public class RandomNoProc { 6 public static void execute (AppParameter param1,AppParameter param2,AppParameter result) { 7 try { 8 long p1=((Long )param1.the_value).longValue(); 9 long p2=((Long )param2.the_value).longValue(); 10 result.the_value=new Long (p1+Math.round(Math.random()*(p2-p1))); 11 System.out.println("The result of RandomNoProc is "+result.the_value); 12 } catch (Exception ex) { 13 System.out.println("RandomNoProc - Problems while executing procedure"); 14 } 15 } 16 } 17 | Popular Tags |