/* * Realizzazione fittizia di InstructionParser, InstructionException * allo scopo di verificare le funzionalita' di UserInterface * prima dell'integrazione con i macromoduli URM e Parser */ public class InstructionParser { public static Instruction parse( String statement ) throws InstructionException { return new Instruction( statement ); } } public class InstructionException extends Exception { public String errorMessage() { return "* Error in instruction"; } } /* * Realizzazione fittizia di URM, Program, Instruction * allo scopo di verificare le funzionalita' di UserInterface * prima dell'integrazione con i macromoduli URM e Parser */ public class URM { public URM(Program program) {} public void input( int i, int x ) {} public int output( int i ) { return i; // Convenzionale } public void run() {} } public class Program { public int upperRegisterIndex() { return (int) ( 10 * Math.random() ); // Intero casuale in [0,10) } public void add( Instruction I ) { } } public class Instruction { public Instruction( String stm ) {} }